Search Unity

Mecanim recording...

Discussion in 'Animation' started by petey, Aug 25, 2017.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hiya!

    Just checking out this stuff for recording mecanim animations and it looks super handy!
    https://docs.unity3d.com/ScriptReference/Animator.StartRecording.html

    If I boil it down my character is made up of one position and rotation parent with a whole bunch of animations so in theory I could create cool replays with this (which is super exciting!!!).
    Just wondering is there a way to save the recorded data for playback later?

    I could see this being super useful. Even to record training clips...

    Thanks,
    Pete
     
  2. RaulOses

    RaulOses

    Joined:
    Jul 10, 2017
    Posts:
    714
    fangfang00 likes this.
  3. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Recording data like that would be super memory consuming and inefficient. You can record mecanim states and at what time they have occurred as well as input data. From there you could simulate the game, thus creating a replay.
     
  4. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Yeah that is why I was interested in the mecanim record system as it seems to record states etc. rather than full transforms so it would probably be pretty lightweight.
    Unfortunately it can’t be saved though :(
    I doubt I’ll have the time to code something like that myself, and it is a little frustrating because the built in record system gets 90% of the job done. Actually not too sure what the point of it is without being able to save it.