This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //visible[0] is an AnimBool, you can cache it somewhere in your custom editor. | |
| using (new EditorUtils.FoldoutScope(visible[0], out var shouldDraw, "SongItem")) | |
| { | |
| if (shouldDraw) | |
| { | |
| //draw the rest of your GUI. | |
| songItem = EditorGUILayout.ObjectField(songItem, typeof(SongItem), false) as SongItem; | |
| } | |
| } |