- Home /
Mecanim recording
I've been looking into recording gameplay and being able to replay it back within the game its self. I have a solution fully working for everything that isn't the mecanim player but due to the complexity of the player a simple position and rotation is in no way good enough. I found in the documentation (And a unity example) the use of these methods on the animator:
http://docs.unity3d.com/ScriptReference/Animator.StartRecording.html http://docs.unity3d.com/ScriptReference/Animator.StartPlayback.html
At the bottom of StartPlayback it mentions "PlaybackRecordedFrame should be used to playback recorded data." but I cant see any way of actually exporting the recordings in some way to be reused (Or any mention of PlaybackRecordedFrame anywhere else)
Is there something I am missing or am I going to need to record user input, play it back in order and use some key frames to ensure it stays synced up?
Any help would be greatly appreciated!
Answer by GameVortex · Feb 04, 2015 at 07:58 AM
I can't find any other references to the "PlaybackRecordedFrame" either, and I suspect it has been removed or renamed. There is no way to export the recorded data. The data is stored in the Animator at runtime. You start the recording with the StartRecording function and then stop the recording with the StopRecording function. You can now play the recording using the StartPlayback function and control the location of the playback with the playbackTime value. The playbackTime value will be in a range between recorderStartTime and recorderStopTime.
I feared it may have been something that was never implemented which is a real shame. The playback system its self works REALLY well, it seems crazy to me that you couldn't just dump that data out! Thanks for your answer :)
Noooooo! Why would they do that? :( The implementation is really nice and simple but not having this option is a huge bummer.