Exemple #1
0
    void DrawPaintHeightInspector()
    {
        GUILayout.Space(5);

        GUILayout.Label("Paint Height Options", EditorStyles.boldLabel);
        GUILayout.BeginVertical(EditorStyles.helpBox);

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Set Height", HeightMode == HeightPaintMode.Set ? ToggleButtonStyleToggled : ToggleButtonStyleNormal))
        {
            HeightMode = HeightPaintMode.Set;
        }

        if (GUILayout.Button("Add Height", HeightMode == HeightPaintMode.Add ? ToggleButtonStyleToggled : ToggleButtonStyleNormal))
        {
            HeightMode = HeightPaintMode.Add;
        }
        EditorGUILayout.EndHorizontal();

        PlanetEditor.ExtrudeHeight = EditorGUILayout.FloatField("Extrude Height: ", PlanetEditor.ExtrudeHeight);

        GUILayout.EndVertical();

        // TODO: Sample Height Tool
    }
Exemple #2
0
    void DrawPaintMaterialInspector()
    {
        GUILayout.Space(5);

        GUILayout.Label("Paint Material Options", EditorStyles.boldLabel);
        GUILayout.BeginVertical(EditorStyles.helpBox);

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Set Height", HeightMode == HeightPaintMode.Set ? ToggleButtonStyleToggled : ToggleButtonStyleNormal))
        {
            HeightMode = HeightPaintMode.Set;
        }

        if (GUILayout.Button("Add Height", HeightMode == HeightPaintMode.Add ? ToggleButtonStyleToggled : ToggleButtonStyleNormal))
        {
            HeightMode = HeightPaintMode.Add;
        }
        EditorGUILayout.EndHorizontal();

        SelectedMaterial = EditorGUILayout.ObjectField("Material", SelectedMaterial, typeof(Material), false) as Material;

        GUILayout.EndVertical();
    }