BezierCurves.BezierCurve3DEditor.OnInspectorGUI C# (CSharp) Method

OnInspectorGUI() public method

public OnInspectorGUI ( ) : void
return void
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            this.serializedObject.Update();

            if (GUILayout.Button("Log Length"))
            {
                Debug.Log(this.curve.GetApproximateLength());
            }

            this.showPoints = EditorGUILayout.Foldout(this.showPoints, "Key Points");
            if (this.showPoints)
            {
                if (GUILayout.Button("Add Point"))
                {
                    AddKeyPointAt(this.curve, this.curve.KeyPointsCount);
                }

                if (GUILayout.Button("Add Point and Select"))
                {
                    var point = AddKeyPointAt(this.curve, this.curve.KeyPointsCount);
                    Selection.activeGameObject = point.gameObject;
                }

                this.keyPoints.DoLayoutList();
            }

            this.serializedObject.ApplyModifiedProperties();
        }