コード例 #1
0
ファイル: Line.cs プロジェクト: elizavetaRa/Hololens-WHAText
            protected override void DrawCustomSceneGUI()
            {
                base.DrawCustomSceneGUI();

                LineBase line = (LineBase)target;

                line.FirstPoint = SquareMoveHandle(line.FirstPoint);
                line.LastPoint  = SquareMoveHandle(line.LastPoint);
            }
コード例 #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;
            }
        }
コード例 #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);
        }