Skip to content

Instantly share code, notes, and snippets.

View ATikadze's full-sized avatar
🏠
Working from home

ATikadze ATikadze

🏠
Working from home
View GitHub Profile
//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;
}
}