예제 #1
0
        protected override void OnEnable()
        {
            if (!controlButtonAsset)
            {
                enabled = false;
                return;
            }

            base.OnEnable();

            tooltip             = GetComponent <Tooltip>();
            holoButton.buttonId = controlButtonAsset.name + '#' + (++Id);

            controlButtonAsset.AddRefreshListener(Refresh);

            Refresh();
        }
예제 #2
0
        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();
        }