Custom inspector - disabling specific controls.

I know there is EditorGUILayout.BeginToggleGroup () - but what I want is the reverse kind of it. When I turn on a toggle and some other controls turn to grey. Is there a way for it?

That can be achieved using something like the following:

using UnityEngine;
using UnityEditor;

public class InspectorExample : Editor {

    private SerializedProperty specialFeature;

    void OnEnable() {
        specialFeature = serializedObject.FindProperty("specialFeature");

    public override void OnInspectorGUI() {

        specialFeature.boolValue = EditorGUILayout.Toggle(specialFeature.boolValue);

        GUILayout.Button("Always active");
        GUI.enabled = specialFeature.boolValue;
        GUILayout.Button("Maybe active");
        GUI.enabled = true;
        GUILayout.Button("Always active");



Warning, not tested, but this should work :slight_smile: