Reorderable List overrides any toolbox attributes
Closed this issue · 3 comments
raad-genies commented
Conditionals/Decorators won't work with reorderable list items
Update: They don't work with list items either
Some more info:
Use case is a class like so
[Serializable]
public class Node
{
public bool someCondition;
[ReorderableList]
[ShowIf("SomeCondition", true]
public List<Node> children;
}
[Serializable]
public class Tree : ScriptableObject
{
public Node rootNode;
}
arimger commented
Hello, Conditionals & Decorators should work for the whole list/array, I mean in your particular case whole children list shouldn't be visible if "SomeCondition" (in your example is a small error because you should use "someCondition") is true. If it's not working then indeed it's a bug. Do you get any warnings/errors? What version of the Unity Editor are you using?
raad-genies commented
@arimger no warnings/errors. I'm on 2020.3.4f1. Also this script is a demo so some typos in it.
arimger commented