Better Foldout in Unity Custom Editor
Creating a better foldout with animation for custom editor in Unity.
Unity's default editor folout
This is how the Unity's default foldout looks like with the code below.
Customised foldout with smooth transition
This is what it looks like in action.
AnimBool is the secret
Having little transition in the editor makes it a joy look at. Below is how the AnimBool becomes useful when in conjunction with the BeginFadeGroup.
I already have a utility class to make life easier, this is how to use it.
Full source code for the utility class, it is straight from my Rhythm Game* assets!
There are many ways to have a better looking editor GUI in your unity project, take a look at Odin*, gives you way better support for reorderable list editing out of the box just by installing, also have tons of PropertyDrawer like
[Button] [FoldoutGroup] [InfoBox] etc.
I used Odin* in most of my other projects, e.g. using the
Another similar project in the open source world is NaughtyAttributes, which they have some similar PropertyDrawer features that may suffice your needs. Not to mention that it is on the openupm registry, which you can install it easily to the Unity PackageManager with their cli.