rememberAnimationNames

The clip names of asset, indexed by animation index, or empty until the asset is ready. Look up an index by name — names.indexOf("Walk") — instead of hard-coding integers. Entries are null for unnamed clips.

val names = rememberAnimationNames(character)
val anim = rememberAnimationState(initialAnimationIndex = names.indexOf("Idle"))