コード例 #1
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
         throw new UnityException("double singleton");
     }
     instance = this;
     DontDestroyOnLoad(gameObject);
 }
コード例 #2
0
ファイル: JPoolManager.cs プロジェクト: jerrypupu111/TheEnd
 void Awake()
 {
     if(instance != null)
     {
         Destroy(gameObject);
         throw new UnityException("double singleton");
     }
     instance = this;
     //DontDestroyOnLoad(gameObject);
 }