void Start () { _panel = GameObject.FindGameObjectWithTag("PopupPanel").GetComponent<UIBistateInteractivePanel>(); GetComponent<UIButton>().SetValueChangedDelegate(onClick); if(Application.loadedLevelName != "Main") _panel.BringIn(); }
public void doHover(string tagName) { if(_isTransitioned) return; _isTransitioned = true; _tagsToRevert.Add(tagName); if(_popupPanel == null) _popupPanel = GameObject.FindGameObjectWithTag("PopupPanel").GetComponent<UIBistateInteractivePanel>(); if(_dismissButton == null) { _dismissButton = GameObject.FindGameObjectWithTag("DismissButton").GetComponent<DismissPopup>(); _dismissButton.onDismissed += normalize; } _popupPanel.BringIn(); foreach(GameObject GO in GameObject.FindGameObjectsWithTag(tagName)) { StartCoroutine(fadeInMaterial(GO)); } StartCoroutine(fadeInBlur()); }