public void SetControlledObject(object item) { try { if (item != null && item is IGlow) { m_Item = (IGlow)item; FillControls(); if (item is IChangeNotify) { ((IChangeNotify)item).ItemChanged += External_ItemChanged; } this.Enabled = true; } else { ClearControls(); this.Enabled = false; } } catch (System.Exception) { } }
private void Start() { GlowEffect = GetComponentInChildren <IGlow>(true); }