Skip to content

Instantly share code, notes, and snippets.

@elaberge
elaberge / MatrixPropertyDrawer.cs
Created January 22, 2019 03:17
Unity property drawer for 4x4 matrices
using UnityEngine;
using UnityEditor;
[CustomPropertyDrawer(typeof(Matrix4x4))]
public class MatrixPropertyDrawer : PropertyDrawer
{
const float CELL_HEIGHT = 16;
Rect position;
SerializedProperty property;
0416b73daaf34f08cbb16e30d27056680d3c7dcb78b963f9002bfd609f0ecb6f5b5e85eb59bf317fc2dbda632655380dd09962d3e16d7576dbbe9b1f4ca710d57e;scohoe
@elaberge
elaberge / unitySizeAnalyzer.sh
Created November 4, 2016 22:56
Unity App Size Analyzer
#!/usr/bin/env bash
function dumpBundle {
FILE=$1
OUTDIR=$2
LZMADIR=$3
OUTPATH="$OUTDIR/$FILE"
LZMAPATH="$LZMADIR/$FILE"
mkdir -p $(dirname "$OUTPATH")
@elaberge
elaberge / MiniJSON.cs
Last active October 3, 2022 11:09 — forked from darktable/MiniJSON.cs
Updated to work correctly with non-English locales.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining