Пример #1
0
        public override void OnInspectorGUI()
        {
            if (HasErrors())
            {
                return;
            }

            BeginEditing();

            OnPreInspectorGUI();

            DropDownProperty("Type", _typeProperty, RampTypeLabels, RampTypeValues, true, true);
            DropDownProperty("Image Mode", _imageAlignmentProperty, RampImageAlignmentLabels, RampImageAlignmentValues, true);

            if (_foldoutGeometry = EditorGUILayout.BeginFoldoutHeaderGroup(_foldoutGeometry, "Geometry"))
            {
                PropertyField(_heightTopProperty, "Top Height", true);
                PropertyField(_heightBottomProperty, "Bottom Height", true);

                EditorGUILayout.Space(10);
                PropertyField(_widthTopProperty, "Top Width", true);
                PropertyField(_widthBottomProperty, "Bottom Width", true);

                EditorGUILayout.Space(10);

                if (MainComponent.IsWireRamp)
                {
                    EditorGUILayout.LabelField("Wire Ramp");
                    EditorGUI.indentLevel++;
                    PropertyField(_wireDiameterProperty, "Diameter", true);
                    PropertyField(_wireDistanceXProperty, "Distance X", true);
                    PropertyField(_wireDistanceYProperty, "Distance Y", true);
                    EditorGUI.indentLevel--;
                }
                else
                {
                    EditorGUILayout.LabelField("Wall Mesh");
                    EditorGUI.indentLevel++;
                    PropertyField(_leftWallHeightVisibleProperty, "Left Wall", true, updateVisibility: true);
                    PropertyField(_rightWallHeightVisibleProperty, "Right Wall", true, updateVisibility: true);
                    EditorGUI.indentLevel--;
                }
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            DragPointsHelper.OnInspectorGUI(this);

            base.OnInspectorGUI();

            EndEditing();
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            if (HasErrors())
            {
                return;
            }

            BeginEditing();

            OnPreInspectorGUI();

            PropertyField(_insertHeightProperty, rebuildMesh: true);
            PropertyField(_positionZProperty, updateTransforms: true);

            DragPointsHelper.OnInspectorGUI(this);

            base.OnInspectorGUI();

            EndEditing();
        }
        public override void OnInspectorGUI()
        {
            if (HasErrors())
            {
                return;
            }

            BeginEditing();

            OnPreInspectorGUI();

            PropertyField(_rotationProperty, rebuildMesh: true);
            PropertyField(_heightProperty, rebuildMesh: true);
            PropertyField(_thicknessProperty, rebuildMesh: true);

            DragPointsHelper.OnInspectorGUI(this);

            base.OnInspectorGUI();

            EndEditing();
        }
Пример #4
0
        public override void OnInspectorGUI()
        {
            if (HasErrors())
            {
                return;
            }

            BeginEditing();

            OnPreInspectorGUI();

            PropertyField(_positionProperty, updateTransforms: true);
            PropertyField(_scaleProperty, updateTransforms: true);
            PropertyField(_rotationProperty, updateTransforms: true);
            PropertyField(_surfaceProperty, updateTransforms: true);

            DragPointsHelper.OnInspectorGUI(this);

            base.OnInspectorGUI();

            EndEditing();
        }
Пример #5
0
        public override void OnInspectorGUI()
        {
            if (HasErrors())
            {
                return;
            }

            BeginEditing();

            OnPreInspectorGUI();

            PropertyField(_heightTopProperty, "Top Height", true, onChanged: () => {
                WalkChildren(PlayfieldComponent.transform, UpdateSurfaceReferences);
            });
            PropertyField(_heightBottomProperty, "Bottom Height", true);

            DragPointsHelper.OnInspectorGUI(this);

            base.OnInspectorGUI();

            EndEditing();
        }
Пример #6
0
 protected override void OnDisable()
 {
     base.OnDisable();
     DragPointsHelper.OnDisable();
 }
Пример #7
0
 private void OnSceneGUI()
 {
     DragPointsHelper.OnSceneGUI(this);
 }