URL: http://wiki.unity3d.com/index.php/Singleton
Generic Based Singletonを参考、てかコピペ
public sealed class Singleton<T> where T : class, new() { /// <summary> /// Singleton implementation, readonly and static ensure thread safeness. /// </summary> public static readonly T Instance = new T (); }
・継承したHoge.cs
public class Hoge : Singleton<Hoge> { }
・Hogeを使う
Hoge.Instance;
これだけか。