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(); }
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(); }