Пример #1
0
            protected override void DrawCustomSceneGUI()
            {
                base.DrawCustomSceneGUI();

                LineBase line = (LineBase)target;

                line.FirstPoint = SquareMoveHandle(line.FirstPoint);
                line.LastPoint  = SquareMoveHandle(line.LastPoint);
            }
        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;
            }
        }
        protected virtual void OnDrawGizmos()
        {
            if (Application.isPlaying)
            {
                return;
            }

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

            GizmosDrawLineRenderer(source, this);
        }