////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            if (CursorDataProvider == null)
            {
                CursorDataProvider = FindObjectOfType <HoverCursorDataProvider>();
            }

            if (ProximityProvider == null)
            {
                ProximityProvider = GetComponent <HoverItemRendererUpdater>();
            }

            if (InteractionSettings == null)
            {
                InteractionSettings = (GetComponent <HoverInteractionSettings>() ??
                                       FindObjectOfType <HoverItemsManager>().GetComponent <HoverInteractionSettings>());
            }

            if (CursorDataProvider == null)
            {
                Debug.LogWarning("Could not find 'CursorDataProvider'.");
            }

            if (ProximityProvider == null)
            {
                //TODO: show warning elsewhere? the renderer is typically added *after* this
                //Debug.LogWarning("Could not find 'ProximityProvider'.");
            }

            if (InteractionSettings == null)
            {
                Debug.LogWarning("Could not find 'InteractionSettings'.");
            }
        }
Beispiel #2
0
        /*--------------------------------------------------------------------------------------------*/
        public virtual void TreeUpdate()
        {
            HoverItemRendererUpdater rendUp  = GetComponent <HoverItemRendererUpdater>();
            HoverIndicator           rendInd = rendUp.ActiveRenderer.GetIndicator();

            rendInd.Controllers.Set(HoverIndicator.HighlightProgressName, this);
            rendInd.Controllers.Set(HoverIndicator.SelectionProgressName, this);

            rendInd.HighlightProgress = Mathf.Max(rendInd.HighlightProgress, MinHightlightProgress);
            rendInd.SelectionProgress = Mathf.Max(rendInd.SelectionProgress, MinSelectionProgress);

            Controllers.TryExpireControllers();
        }