Esempio n. 1
0
        private void LateUpdate()
        {
            if (_rayInteractor.State == InteractorState.Disabled)
            {
                return;
            }

            switch (_rayInteractor.State)
            {
            case InteractorState.Normal:
                PolylineGizmos.Color = _normalColor;
                break;

            case InteractorState.Hover:
                PolylineGizmos.Color = _hoverColor;
                break;

            case InteractorState.Select:
                PolylineGizmos.Color = _selectColor;
                break;

            case InteractorState.Disabled:
                return;
            }

            PolylineGizmos.LineWidth = _rayWidth;
            PolylineGizmos.DrawLine(_rayInteractor.Origin, _rayInteractor.End);
        }
 protected virtual void LateUpdate()
 {
     PolylineGizmos.LineWidth = 0.03f;
     foreach (PointData pointData in _points.Values)
     {
         PolylineGizmos.Color = pointData.Selecting ? _selectColor : _hoverColor;
         PolylineGizmos.DrawPoint(pointData.Pose.position);
     }
 }
Esempio n. 3
0
        protected virtual void OnDisable()
        {
            if (_polylineRenderer != null)
            {
                _polylineRenderer.Cleanup();
                _polylineRenderer = null;
            }

            if (Application.isPlaying)
            {
                return;
            }

    #if UNITY_EDITOR
            if (_root == this)
            {
                EditorApplication.playModeStateChanged -= PlayModeStateChanged;
                Camera.onPreCull -= HandlePreCullRender;
                _root             = null;
            }
    #endif
        }