Slaimi
1
I want to create a script in which the user can select his mode, and then according to this will appreciate different subconfigurations, such as the script Canvas Scaler.

Thanks
Dropdowns like this are the result of enums. If you want to show/hide other parameters depending on the value selected, you have to create a custom editor
Here’s an exemple MonoBehaviour:
using UnityEngine;
public class MyClass : MonoBehaviour
{
public enum MyEnum
{
First, Second
}
public MyEnum myEnumValue;
public bool relatedToFirstOnly;
public int relatedToSecondOnly;
}
And a custom editor:
using UnityEditor;
[CustomEditor(typeof(MyClass))]
public class MyClassCustomEditor : Editor
{
public override void OnInspectorGUI()
{
MyClass myClassItem = this.target as MyClass;
EditorGUILayout.PropertyField(this.serializedObject.FindProperty("myEnumValue"));
if (myClassItem.myEnumValue == MyClass.MyEnum.First)
{
EditorGUILayout.PropertyField(this.serializedObject.FindProperty("relatedToFirstOnly"));
}
else if (myClassItem.myEnumValue == MyClass.MyEnum.Second)
{
EditorGUILayout.PropertyField(this.serializedObject.FindProperty("relatedToSecondOnly"));
}
serializedObject.ApplyModifiedProperties();
}
}