I used PropertyDrawers to automatically display a list of skills on the inspector.
So, I have a ListSkillDrawer and a SkillDrawer.
SkillDrawer have some values needed to be saved for its own uses, like a popup index (to remember the position in the popup) or a foldout.
The problem is, when I change one of these values, it is saved in the SkillDrawer, then all drawers received the update.
So, I can easily assume that drawers are allocated once for all.
But what can we do if we want to brake this rule?
In my example, if we have many skills, one foldout will command all skills’s foldout.
Does someone have an answer?
I have an idea on how to do my stuff, but it a pretty ugly trick.
Here is my explanation.
I wrote the ListDrawer, so when I’m calling PropertyField to draw my children, I can send them an iterator by the label. Thus, SkillDrawers will saved popup’s index and fold in an array.