Hi!
When I write this code :
var b : boolean;
for (var i=0; i<=5; i++){
b = EditorGUILayout.Foldout(b, "test");
}
if (b){
GUILayout.Button ("test");
}
I get 6 foldouts and when I try to open one of them, all other open. Also, only one button shows up.
What I want to do is create N number of foldouts and each should open separately from other foldouts.
Problem is, I can’t manage to make it work.
I tried to make array of booleans and pull them through for loop, something like this :
for (var i =0; i<=5; i++){
b _= EditorGUILayout.Foldout (b*, "Something");*_
}
if (b*){*
// something
}
But that doesn’t work.
By additional googling I found out that people did use that code above before and it worked.
Where am I making mistake ?
Thanks!