Hi folks,
I got a little problem with the editor modding, because the Unity GUI appears to have no sort of drop down menues or checkboxes implemented by default.
Let me first descripe to you what I’m about to do:
I got an array AR of a specific size in a static script A.
I got an Editor Modification Script B.
In this Editorscript B I would like to choose between ONE entry of the array AR.
Since only one could be active at a time a drop down menue or checkbox would make perfect sence.
I looked for some dropdown menue scripts but that mostly led to problems like
“no buttons underneath the dropdown entries” or “the number of entries has to be fixed” etc.
Ofc the size of the array AR is allways known, but someone who has mo idea of coding should be able to add simply entries to that array AR.
(its initialized in a way like that:
... {new myClass("stuff", 1), ("morestuff", 2), ... }
)
Someone who has no idea of coding could still edit the this list.
From this Array I would like to generate the entries in the dropdown menue.
So its kinda dynamically.
I tried to work arround this by implementing a own approch of a combobox, but this seems to be a kinda unperformant way:
pseudo code:
for( number of entries in AR )
if( Toggle(...) )
for(number of entries)
uncheck Toggle
check clicked Toggle
This obviously ends with a lot of GUI-Calls, and while this isn’t that much of a bad thing since my PC can handle this I’m pretty sure there is a better way to do so.
Has anyone of you encountered similar problems or know a better way to solve this problem?
Thanks for any help.