I want to limit file size in my game.
Two player models in my game share identical animations. And there are quite a few of them.
I was planning on using FBX player models with the animations loaded in the FBX file.
However, if I do that wont each set of identical animations be separate ? And thus will not the file size be needlessly larger ?
Is there a way to share animations for characters where the download time is not increased. Or does the game already optimize for this somehow ?
You can bring in a range of characters that share one common set of animations as long as those characters have the same skeletal/rig structure. That is definitely a way to save on file size, especially if the animations are all the same.
If you’re wondering exactly how you might do this…
-
in your asset list, expand the contents of your animated file from your 3d app - you should see animation clip files inside. If you’re having unity split a single file into multiple clips for you (such as having a “walk”, “run” and “idle” all in a single file) then each of those clips will be individually listed in your asset list under that single file. If you haven’t explicitly defined the animation clip names, it will simply say something like “Take001”.
-
You can then simply drag these clips from your asset list onto the animation component of another gameobject in your scene. If the rig/heirarchy of the object you add it to are identical to the source, it should just work!