public void Close(string name) { UIWidget widget = WidgetUtility.Find <UIWidget>(name); if (widget != null) { widget.Close(); } }
public void Show(string name) { UIWidget widget = WidgetUtility.Find <UIWidget>(name); if (widget != null) { widget.Show(); } }
/// <summary> /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. /// </summary> private void Start() { //Find tooltip instance with name "Tooltip" instance = WidgetUtility.Find <Tooltip> (instanceName); //Check if an instance of UITooltip is located in scene if (enabled && instance == null) { //No instance -> disable trigger enabled = false; } this.m_PropertyPairs = new List <KeyValuePair <string, string> >(); for (int i = 0; i < properties.Length; i++) { this.m_PropertyPairs.Add(new KeyValuePair <string, string>(properties[i].key, properties[i].value)); } }