Foldout Expanded By Default
By using a combination of the Property States system and Odin's OnInspectorInit attribute we can set the state of the foldout everytime the inspector initializes.
1 2 3 4 5 6 7 8 9 10 |
|
The @ sign denotes this string as an [Attribute Expression] which makes everything behind it be basically treated as normal code. $property
is a [NamedValue] and gives us the InspectorProperty of the ClassInstance
field. It holds the foldout's state which we can then set directly.
Last update: September 30, 2021