private void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(_instance.gameObject); } else { DestroyImmediate(gameObject); return; } ShortConsole = GetComponentInChildren <ShortConsole>(true); ShortConsole.Initialize(); FullScreenConsole = GetComponentInChildren <LongConsole>(true); FullScreenConsole.Initialize(); FullScreenConsole.CommandRaised += HubScene.LoadHubScene; FullScreenConsole.CommandRaised += Version.PrintVersion; _openBtn.onClick.AddListener(() => { FullScreenConsole.gameObject.SetActive(true); ShortConsole.gameObject.SetActive(false); }); _closeLongConsoleBtn.onClick.AddListener(() => { FullScreenConsole.gameObject.SetActive(false); ShortConsole.gameObject.SetActive(true); }); _hideBtn.onClick.AddListener(() => { ShortConsole.gameObject.SetActive(false); _hiddenConsole.gameObject.SetActive(true); }); _closeConsole.onClick.AddListener(() => { ShortConsole.gameObject.SetActive(false); }); _hiddenConsole.onClick.AddListener(() => { ShortConsole.gameObject.SetActive(true); _hiddenConsole.gameObject.SetActive(false); }); }
private void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(_instance.gameObject); } else { DestroyImmediate(gameObject); return; } foreach (var item in _deviseIds) { if (SystemInfo.deviceUniqueIdentifier == item) { _idContains = true; break; } } ShortConsole = GetComponentInChildren <ShortConsole>(true); ShortConsole.Initialize(); LongConsole = GetComponentInChildren <LongConsole>(true); LongConsole.Initialize(); _openBtn.onClick.AddListener(() => { LongConsole.gameObject.SetActive(true); ShortConsole.gameObject.SetActive(false); }); _closeLongConsoleBtn.onClick.AddListener(() => { LongConsole.gameObject.SetActive(false); ShortConsole.gameObject.SetActive(true); }); _closeConsole.onClick.AddListener(() => { ShortConsole.gameObject.SetActive(false); }); _mouseInputs = new Vector3[_mouseInputMaxSize]; }