I have a fairly involved cutscene containing a couple of character models, about 15 tracks, and a total of about 50 different clips. When I call Play() on this cutscene, there’s a pretty big framerate drop. I was hoping to find some way to perform the heavy lifting while my scene is first loading, so that when I call Play() it starts without delay. I tried calling Sample() on the cutscene, but that doesn’t prevent the delay later when I call Play().
Do I have any options to preload a cutscene to avoid the performance hit?
This is known problem when Animator Tracks are used, since the root motion of those animator tracks is baked in the initialization of the cutscene. This is done this way so that the root motion begins at where the current position/rotation of the character is, which can be important, if you want a cutscene to take over from wherever the character is now. With that said, this is probably the most requested “feature” that being the ability to prebake the root motion since the above stated ability is not always required.
Pre-baking the root motion is planned for the next version and will exist as an option in the Animator Track (layer 0) inspector.
This option will allow to pre-bake the root motion in the editor so that it’s not done in runtime. The downside, is that with pre-baked root motion, the current position/rotation of the character in runtime will no longer matter though, meaning tha he will always be teleported to the baked root motion data. (I hope that made sense 🙂 )
For the meantime and until this is done, I would recomend to uncheck the “Use Root Motion” option in the Animator Track which you dont really need Root Motion (unless of course you do).