예제 #1
0
 private void Awake()
 {
     if (instance == null)
         instance = this;
     else if (instance != this)
     {
         Debug.LogError($"There are 2 or more instance of \'{nameof(LuviConsole)}\' on the scene. The latest instance will be destroy.");
         Destroy(gameObject);
         return;
     }
     Initialize();
 }
예제 #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Debug.LogError($"There are 2 or more \'{NAME}\' on the scene. The new instance will be destroy.");
         Destroy(gameObject);
         return;
     }
     Initialize();
 }