This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2012 Calvin Rien | |
// http://the.darktable.com | |
// | |
// This software is provided 'as-is', without any express or implied warranty. In | |
// no event will the authors be held liable for any damages arising from the use | |
// of this software. | |
// | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it freely, | |
// subject to the following restrictions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
public class GUIMerge : MonoBehaviour { | |
public GUISkin primary; | |
public GUISkin[] skins; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can switch to a regular Update() loop | |
// if you comment out this line. (makes debugging easier) | |
#define COROUTINE | |
// | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Text; | |
using UnityEngine; | |
using Debug = UnityEngine.Debug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
namespace UnityEngine { | |
/// <summary> | |
/// Usage: | |
/// | |
/// (optional) Call GUIScaler.Initialize() in Start(), Awake() or OnEnable() (only needed once) | |
/// Call GUIScaler.Begin() at the top of your OnGUI() methods | |
/// Call GUIScaler.End() at the bottom of your OnGUI() methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using DB = UnityEngine.Debug; | |
public class SelectWithLayer : ScriptableObject { | |
static void SelectLayer(int layerNum) { | |
var objs = Selection.GetFiltered(typeof(GameObject), SelectionMode.Deep); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax: glob | |
.DS_Store | |
*.sln | |
*.userprefs | |
*.csproj | |
*.pidb | |
*.unitypackage | |
syntax: regexp | |
^Build/.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
public class IconPostprocessor : AssetPostprocessor { | |
void OnPreprocessTexture () { | |
if (assetPath.ToLower().StartsWith(Path.Combine("assets", "platform"))) { | |
var ti = (TextureImporter) assetImporter; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"frames": { | |
{% for sprite in spritesAndAliases %} | |
"{{ sprite.name }}": | |
{ | |
"frame": {"x":{{ sprite.textureRectX }},"y":{{ sprite.textureRectY }},"w":{{ sprite.textureRectWidth }},"h":{{ sprite.textureRectHeight }}}, | |
"rotated": {% if sprite.isRotated %}true{% else %}false{% /if %}, | |
"trimmed": {% if sprite.isTrimmed %}true{% else %}false{% /if %}, | |
"spriteSourceSize": {"x":0,"y":0,"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, | |
"sourceSize": {"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, | |
"spriteColorRect": {"x":{{ sprite.sourceColorRectX }},"y":{{ sprite.sourceColorRectY }},"w":{{ sprite.sourceColorRectWidth }},"h":{{ sprite.sourceColorRectHeight }}}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DEBUG_CONSOLE | |
#define DEBUG_LEVEL_LOG | |
#define DEBUG_LEVEL_WARN | |
#define DEBUG_LEVEL_ERROR | |
#if (UNITY_EDITOR || DEVELOPMENT_BUILD) | |
#define DEBUG | |
#endif | |
#if (UNITY_IOS || UNITY_ANDROID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |