Skip to content

Instantly share code, notes, and snippets.

@kalineh
Last active January 18, 2016 20:37
Show Gist options
  • Save kalineh/a2c879abe2a2e9b38fac to your computer and use it in GitHub Desktop.
Save kalineh/a2c879abe2a2e9b38fac to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
using System.Reflection;
public class SingletonMonoBehaviour<T>
: MonoBehaviour
{
#if UNITY_EDITOR
[UnityEditor.Callbacks.DidReloadScripts]
public static void OnScriptReload()
{
}
#endif
public static T Instance;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment