Created
July 26, 2017 03:03
-
-
Save mao-test-h/88873d5dc99b9709c737be02f1640ab8 to your computer and use it in GitHub Desktop.
Unity向け シングルトン基底クラス(MonoBehaviour非継承)
This file contains hidden or 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
namespace Singleton | |
{ | |
/// <summary> | |
/// シングルトン基底クラス(MonoBehaviour非継承) | |
/// </summary> | |
public abstract class Singleton<T> where T : class, new() | |
{ | |
public static readonly T Instance = new T(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment