public static DisplayObj GetDisplayObj(this GameObject go) { DisplayBehaviour vo = go.GetComponent <DisplayBehaviour>(); if (vo != null) { return(vo.disObj); } return(null); }
public static object GetData(this GameObject go) { DisplayBehaviour vo = go.GetComponent <DisplayBehaviour>(); if (vo != null) { return(vo.data); } return(null); }
/// <summary> /// Update this button to match the current event listening and display requirements. /// </summary> /// <remarks> /// This is called when some button state is changed or if the underlying virtual environment object changes /// and needs to be resynchronized. /// </remarks> protected void Update() { if (m_enabled) { EnableEvents(); } else { DisableEvents(); } DisplayBehaviour.UpdateAppearance(); LabelBehaviour.UpdateAppearance(); }
public static void SetDisplayObj(this GameObject go, ref DisplayObj disObj) { DisplayBehaviour vo = go.GetComponent <DisplayBehaviour>() ?? go.AddComponent <DisplayBehaviour>(); vo.disObj = disObj; }
public static void SetData(this GameObject go, object data) { DisplayBehaviour vo = go.GetComponent <DisplayBehaviour>() ?? go.AddComponent <DisplayBehaviour>(); vo.data = data; }