Skip to content

Instantly share code, notes, and snippets.

@mao-test-h
Created July 26, 2017 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mao-test-h/88873d5dc99b9709c737be02f1640ab8 to your computer and use it in GitHub Desktop.
Save mao-test-h/88873d5dc99b9709c737be02f1640ab8 to your computer and use it in GitHub Desktop.
Unity向け シングルトン基底クラス(MonoBehaviour非継承)
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