Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        // Create labels and fields for inputing of properties

        EditorGUILayout.PropertyField(isDarkTheme);

        EditorGUILayout.LabelField("Color Palette");

        EditorGUI.indentLevel++;

        EditorGUILayout.PropertyField(accentColor);

        EditorGUILayout.LabelField("Button State Colors");

        EditorGUI.indentLevel++;

        EditorGUILayout.PropertyField(hoverColor);

        EditorGUILayout.PropertyField(pressedColor);

        EditorGUILayout.PropertyField(disabledColor);

        // Apply input properties and call script to update colors

        serializedObject.ApplyModifiedProperties();

        VRUIColorPalette colorPalette = (VRUIColorPalette)target;

        colorPalette.UpdateColors();
    }