public static Component SetCustomValue(GameObject go, string value) { DropDownEvent dde = go.GetComponentInChildren <DropDownEvent>(); if (dde != null) { dde.initializeUiTextToDropdown = false; } TMP_Dropdown dd = go.GetComponentInChildren <TMP_Dropdown>(); if (dd != null) { dd.SetValueWithoutNotify(0); } return(UiText.SetText(go, value)); }
public void DoActivateTrigger() { //Debug.Log("doactivate " + this); if (uiToControlVisibility) { uiToControlVisibility.SetActive(!uiToControlVisibility.activeSelf); if (hideThisWhenUiVisible) { gameObject.SetActive(!uiToControlVisibility.activeSelf); } } if (!string.IsNullOrEmpty(alternateText)) { string temp = UiText.GetText(gameObject); UiText.SetText(gameObject, alternateText); alternateText = temp; } }