protected override void OnEnable() { if (!controlButtonAsset) { enabled = false; return; } base.OnEnable(); tooltip = GetComponent <Tooltip>(); holoButton.buttonId = controlButtonAsset.name + '#' + (++Id); controlButtonAsset.AddRefreshListener(Refresh); Refresh(); }
protected override void OnEnable() { if (!controlButtonAsset) { enabled = false; return; } base.OnEnable(); tooltip = GetComponent <Tooltip>(); var holoButton = buttonImage as HolographicButton; if (holoButton != null) { holoButton.buttonId = controlButtonAsset.name + '#' + (++Id); } controlButtonAsset.AddRefreshListener(Refresh); Refresh(); }