Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();

            serializedObject.Update();

            /////////////////////////////////////////////////
            /////////////////////////////////////////////////
            /////////////////////////////////////////////////
            Space();

            EditorGUILayout.LabelField("Main Options", SS_Common.StyleTitle);

            //Area NAme UI
            DrawAreaName();

            //Draw Parent Name
            SS_Common.DrawInstancerParentUI(Target.gameObject);

            // TRANSFORM OPTIONS FOLDOUT
            DrawTransformOffsetsFoldout();

            Space();
            Space();
            EditorGUILayout.LabelField("Grid Options", SS_Common.StyleTitle);


            DrawGridSizeOptions();

            DrawRandomProbabilityOptions();

            DrawGridBorderOptions();


            Space();
            Space();
            EditorGUILayout.LabelField("Prefabs", SS_Common.StyleTitle);


            EditorGUILayout.BeginVertical("Button");
            Space();
            EditorGUILayout.PrefixLabel("Prefabs Options");

            DrawPrefabOptions();


            //DISTRIBUTION OPTIONS
            if (GetPrefabArraySize().intValue > 1)
            {
                DrawDistributionOptions();
            }

            // PREFAB OPTIONS FOLDOUT
            DrawPrefabArrayFoldout();
            Space();

            EditorGUILayout.EndVertical();


            /////////////////////////////////////////////////
            /////////////////////////////////////////////////


            /*
             * EditorGUILayout.BeginVertical("Button");
             *
             * GUILayout.Space(7);
             * //GUILayout.Label("");
             * EditorGUILayout.PropertyField(GetPrefabArraySize());
             * GUILayout.Space(7);
             *
             * EditorGUILayout.EndVertical();
             *
             * for (int i = 0; i < GetPrefabArraySize().intValue; i++)
             * {
             *  EditorGUILayout.BeginVertical("Button");
             *
             *  GUILayout.Space(7);
             *  SerializedProperty theProp = GetPrefabArrayAtIndex(i);
             *  EditorGUILayout.PropertyField(GetPrefabGO(theProp));
             *  GUILayout.Space(7);
             *
             *  EditorGUILayout.EndVertical();
             * }
             */



            serializedObject.ApplyModifiedProperties();

            /////////////////////////////////////////////////
            /////////////////////////////////////////////////

            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(Target, "Moved Point");
                Target.GeneratePrefabs();
            }
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();

            Space();

            serializedObject.Update();

            EditorGUILayout.PropertyField(theShapeTransform);

            serializedObject.ApplyModifiedProperties();

            EditorGUILayout.LabelField("Main Options", SS_Common.StyleTitle);

            // AREA NAME
            DrawAreaName();

            // AREA PARENT
            SS_Common.DrawInstancerParentUI(Target.gameObject);


            // SEGMENTS OPTIONS
            DrawTransformOffsetsFoldout();


            Space();
            Space();
            EditorGUILayout.LabelField("Wall Options", SS_Common.StyleTitle);
            // COLLIDER OPTIONS
            DrawColliderOptions();

            // SEGMENTS OPTIONS
            DrawSegmentOptions();

            Space();
            Space();

            EditorGUILayout.LabelField("Walls", SS_Common.StyleTitle);


            // PREFAB OPTIONS
            DrawPrefabOptions();

            //DISTRIBUTION OPTIONS
            if (GetWallPrefabArraySize().intValue > 1)
            {
                DrawDistributionOptions();
            }

            // PREFAB OPTIONS FOLDOUT
            DrawPrefabArrayFoldout();


            Space();
            Space();

            EditorGUILayout.LabelField("Corners", SS_Common.StyleTitle);

            DrawCornerArrayFoldout();


            Space();
            Space();
            ////////////////////////
            // HOLES OPTIONS
            ///////////////////////
            EditorGUILayout.LabelField("Holes", SS_Common.StyleTitle);

            DrawHolesOptions();

            /////////////////////////////////////////////////

            serializedObject.ApplyModifiedProperties();
            /////////////////////////////////////////////////
            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(Target, "Moved Point");
                Target.GeneratePrefabs();
            }
        }
Ejemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();

            serializedObject.Update();


            Space();

            EditorGUILayout.LabelField("Main Options", SS_Common.StyleTitle);

            DrawAreaName();

            SS_Common.DrawInstancerParentUI(Target.gameObject);


            // TRANSFORM OPTIONS FOLDOUT
            DrawTransformOffsetsFoldout();


            Space();
            Space();
            EditorGUILayout.LabelField("Floor Options", SS_Common.StyleTitle);

            // COLLIDER OPTIONS
            DrawColliderOptions();



            Space();
            Space();

            EditorGUILayout.LabelField("Prefabs", SS_Common.StyleTitle);

            // PREFABS OPTIONS
            EditorGUILayout.BeginVertical("Button");
            Space();
            EditorGUILayout.PrefixLabel("Prefabs Options");

            DrawPrefabOptions();


            //DISTRIBUTION OPTIONS
            if (GetPrefabArraySize().intValue > 1)
            {
                DrawDistributionOptions();
            }

            // PREFAB OPTIONS FOLDOUT
            DrawPrefabArrayFoldout();
            Space();

            EditorGUILayout.EndVertical();



            serializedObject.ApplyModifiedProperties();
            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(Target, "Moved Point");
                Target.GeneratePrefabs();
            }
        }
Ejemplo n.º 4
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();
            serializedObject.Update();

            Space();

            EditorGUILayout.LabelField("Main Options", SS_Common.StyleTitle);

            // AREA NAME
            DrawAreaName();

            // AREA PARENT
            SS_Common.DrawInstancerParentUI(Target.gameObject);


            // SEGMENTS OPTIONS
            DrawTransformOffsetsFoldout();


            Space();
            Space();
            EditorGUILayout.LabelField("Scatter Options", SS_Common.StyleTitle);
            serializedObject.Update();

            EditorGUILayout.PropertyField(scatterCount);

            EditorGUILayout.PropertyField(randSeed);

            EditorGUILayout.PropertyField(wallOffset);

            EditorGUILayout.PropertyField(randomRotation);

            EditorGUILayout.PropertyField(avoidSelfCollision);


            serializedObject.ApplyModifiedProperties();

            Space();
            Space();

            EditorGUILayout.LabelField("Prefabs", SS_Common.StyleTitle);


            // PREFAB OPTIONS
            DrawPrefabOptions();

            //DISTRIBUTION OPTIONS
            if (GetPrefabArraySize().intValue > 1)
            {
                DrawDistributionOptions();
            }

            // PREFAB OPTIONS FOLDOUT
            DrawPrefabArrayFoldout();


            /*
             *
             * EditorGUILayout.PropertyField(serializedObject.FindProperty("thePrefabs"));
             * EditorGUILayout.PropertyField(GetPrefabArraySize());
             *
             * for (int i = 0; i < GetPrefabArraySize().intValue; i++)
             * {
             *  SerializedProperty theProp = GetPrefabArrayAtIndex(i);
             *
             *  EditorGUILayout.PropertyField(theProp);
             *  EditorGUILayout.PropertyField(GetPrefabGO(theProp));
             *  EditorGUILayout.PropertyField(GetPrefabSize(theProp));
             *
             * }
             *
             * EditorGUILayout.PropertyField(scatterCount);
             */

            serializedObject.ApplyModifiedProperties();

            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(Target, "Moved Point");
                Target.GeneratePrefabs();
            }
        }