There is an animation track limit of 256 tracks on a single Animator. I’m making an FPS game with a lot of animations, and I’m worried I’ll hit that limit.
My only question is do animation tracks unload? How do they, when do they, can I manually unload them myself? Do they disappear once stopped?
What plugin are you using? If you are comfortable with Moon Animator and the default animation program, you could make the rest of the animations on a different plugin.
No, I mean in game. When you load an animation onto the Animator in the Humanoid, how does it unload, and how do I know if I unloaded it?
There are going to be many many many guns in this game. What if a player switches to a gun, all those animations get loaded, then gets switched to another gun? How do I know those previous animations that I loaded (shooting primary and secondary fire, reloading, etc) are unloaded?
I can’t think of a case where even a game with various healing, reloading, and jamming animations would hit that limit. What exactly are you doing?
Sorry! I misunderstood the question. Unfortunately scripting isn’t my area of expertise. Best of luck finding your answer!
Maya’s question is asking whether animations can be unloaded or not. They already know there is a hard limit of 256 - read the OP’s question before answering…
The game is like the Arms Race gamemode in CS:GO. You get a few kills, it switches to another weapon. Please now imagine someone is in a singleplayer server and they go through 64 weapons. I know that’s a lot, but please just imagine that. If each weapon has at least 4 animations with it (reloading, shooting primary, shooting secondary, idle), then how can I unload animations that are no longer needed? Do I just set all the variables relating to them to nil and let Lua garbage collection clean it up, or do I need to Destroy the AnimationTrack instance?
When the animation finishes playing, it’ll automatically be removed from the
Animator instance. You won’t have to worry about destroying it or anything.
Yeah… My game hits the limit but the animations seem to only break on the client-side.