public void DisplayNotification() { DisplayEventManager.OnClearDisplay(); if (_activeButton == null) { _activeButton = this; Activate(); return; } if (_activeButton != this) { _activeButton.Deactivate(); _activeButton = this; Activate(); return; } if (_activeButton == this) { Deactivate(); _activeButton = null; return; } Debug.Log(_activeButton.gameObject.transform.GetSiblingIndex()); }
// Use this for initialization private void Start() { _image = gameObject.GetComponent <RawImage>(); // Clear Display. DisplayEventManager.OnClearDisplay(); }