Exemplo n.º 1
0
            protected override void DrawCustomSceneGUI()
            {
                base.DrawCustomSceneGUI();

                LineBase line = (LineBase)target;

                line.FirstPoint = SquareMoveHandle(line.FirstPoint);
                line.LastPoint  = SquareMoveHandle(line.LastPoint);
            }
Exemplo n.º 2
0
        public static void GizmosDrawLineRenderer(LineBase source, LineRendererBase renderer)
        {
            switch (renderer.StepMode)
            {
            case StepModeEnum.FromSource:
                GizmosDrawLineFromSource(source, renderer);
                break;

            case StepModeEnum.Interpolated:
                GizmosDrawLineInterpolated(source, renderer);
                break;
            }
        }
Exemplo n.º 3
0
        protected virtual void OnDrawGizmos()
        {
            if (Application.isPlaying)
            {
                return;
            }

            if (source == null)
            {
                source = gameObject.GetComponent <LineBase>();
            }
            if (source == null || !source.enabled)
            {
                return;
            }

            GizmosDrawLineRenderer(source, this);
        }