EditorGUILayout - dropdown / linked toggles & foldout+togglegroup combined

Hello all,

I am wondering if it’s possible to create a dropdown menu much like the ones you have in the Shuriken particle system to change between constant values and curves.
If not, is there a function to create “linked” toggle buttons or if you have to link them yourself? Like if you enable one of them, all the others are disabled.

Also, is it possible to combine a foldout and group toggle to create different ahm…“chapters”. Again, look at the Shuriken. You can click on “Emission” for example to unfold the field, but you can also click the toggle to disabled the whole field.
If it’s possible, how?


ok I found EditorGUILayout.enumPopup, but when I use it I get an error: "Cannot implicitly convert type ‘System.Enum’ to ‘MyClass.TimeUnit’.

TimeUnit is an enum in another script. I made a property called Unit in that script and I try to use it in my editorscript:

t.Unit = EditorGUILayout.EnumPopup("Time unit: ", t.Unit);

Why do I get this error?

You need to set (ClassName.TimeUnit) before the EnumPopup call.
Something like this:

private t.TimeUnit timeUnitOptions;
timeUnitOptions = (t.TimeUnit)EditorGUILayout.EnumPopup("Time unit: ", timeUnitOptions);