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 UnityEditor; | |
using UnityEditorInternal; | |
using System.Collections.Generic; | |
using UnityEditor.AnimatedValues; | |
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)] | |
[CanEditMultipleObjects] | |
public class CustomEditorBase : Editor | |
{ |
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 UnityEditor; | |
using UnityEngine; | |
using System.Collections; | |
using System.Globalization; | |
// Put this file in folder named "Editor" | |
// This tool will be shown in menu "Window / Color HEX To C#" | |
namespace Toolbox | |
{ |
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
/* | |
* ScrollElement - Kinetic scrolling for WebKit on touch devices. | |
* http://webkitjs.org/ScrollElement/ | |
* | |
* Copyright (c) 2011 Niclas Norgren, http://niclas.n3g.net | |
* Created 2011-03-13 | |
*/ | |
/** | |
* Simple bind method |
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; | |
/// <summary> | |
/// Automatically scales quality up or down based on the current framerate (average). | |
/// </summary> | |
/// | |
/// \author Kaspar Manz | |
/// \date 2014-03-10 | |
/// \version 1.0.0 |
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
// Wizard to convert a cubemap to an equirectangular cubemap. | |
// Put this into an /Editor folder | |
// Run it from Tools > Cubemap to Equirectangular Map | |
using UnityEditor; | |
using UnityEngine; | |
using System.IO; | |
class CubemapToEquirectangularWizard : ScriptableWizard { |
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; | |
/** | |
* A camera to help with Orthagonal mode when you need it to lock to pixels. Desiged to be used on android and retina devices. | |
*/ | |
public class PixelPerfectCam : MonoBehaviour { | |
/** | |
* The target size of the view port. | |
*/ | |
public Vector2 targetViewportSizeInPixels = new Vector2(480.0f, 320.0f); | |
/** |
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
# Local Dates: | |
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt | |
# ISO Dates: | |
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt |
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; | |
using System.Collections; | |
/// <summary> | |
/// Class for holding singleton component instances in Unity. | |
/// </summary> | |
/// <example> | |
/// [UnitySingleton(UnitySingletonAttribute.Type.LoadedFromResources, false, "test")] | |
/// public class MyClass : UnitySingleton<MyClass> { } |
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 System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
public class RemoveEmptyFolders | |
{ | |
/// <summary> | |
/// Use this flag to simulate a run, before really deleting any folders. | |
/// </summary> |
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
/* | |
Implementation of ISynchronizeInvoke for Unity3D game engine. | |
Can be used to invoke anything on main Unity thread. | |
ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. | |
I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject. | |
help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class | |
example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631 | |
license: WTFPL (http://www.wtfpl.net/) |
OlderNewer