I’ve written a replay system that saves position, rotation and any other keys you want from all objects spawned as animations. Currently each object spawned is creating a new .anim file, these files are being saved and loaded correctly, the replay system is working fine. However the problem comes with saving the .anim files, each save takes about half a second.
A typical recorded game will probably take 1,000 or more of these files. This is a problem. Is there any way to save the files faster? I’ve noticed that after the files are saved they appear in the editor instantly, this says to me that Unity is not only saving them immediately, but importing them. There is also a busy mouse cursor flashing as the assets are being saved. I don’t need them imported right now, is there any way to delay that? Can you just turn off asset importing temporarily?
Or is there any way to save the files outside of the asset database? Maybe in a folder along side Assets? It’s not a big deal if I have to manually import these assets after I’m finished, that would be preferable to waiting 10+ minutes for Unity to very slowly serialize these assets, stop to import that one asset, go on to the next asset, etc.
It just seems to me that there would be a way to serialize these AnimationClip objects without having to go through the asset database.