private void Awake() { if (instance == null) { instance = this; } }
private void Awake() { // instance = this; if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } else if (instance != null) { Destroy(gameObject); } msgids = new ushort[] { (ushort )UIEvent.HideLauncher, (ushort )UIEvent.ShowLauncher }; RegistSelf(this, msgids); }