Forum rules - please read before posting.

Call for testing: RememberAnimator

Not being able to save the state of animations in the same way you can save transforms, visibility etc has long been a pet peeve of mine - and others, I'm sure.

The main issue is that there's so much that can go wrong with an automated solution that it's always been better to just go down the "OnLoad" route to set up animation manually because - though a little annoying - it's at least guaranteed to work.  Still, updates to Unity's API and documentation have led me to try this again.

This time, though, I'm opening it up to a public "testing" phase to see if it's stable enough to be included in AC officially.  It's one of those features that would easily get relied upon and forgotten about - so it's not something that can be added in on a whim.

So!  If you want to help out with some testing, you can download the experimental "RememberAnimator" component here:

RememberAnimator.unitypackage

To use it, just place on the same GameObject as an Animator component, and cross your fingers it actually saves/restores the state of it when loading a save game!

A couple of caveats:
  • This is for Mecanim only.  Legacy's API is even more complicated to wade through, so this is for Animator components, not Animation.
  • Transitions will not be saved.  Parameters, layer weights, and animation states will be.  If an Animator is saved mid-transition, then it will look to the clip it's transitioning to as the clip to save.

If anyone's brave enough to test it, please let me know how you go!

Comments

  • Way cool! ^:)^

    According to the plan I'll be working on new stuff during the second half of February where this could be really handy, but I'll add it immediately and see if it causes any problems with my current setup.
  • Looks good so far. I haven't been able to test it with layers or head-turning yet, but all the regular animation looks spot on and it handles multiple animated objects really well. Loading states with the component removed doesn't crash anything either. 
  • Excellent, thanks.  How about you, @Snebjorn?
  • No problems to report so far.

    In the development sprint starting today, I'll be implementing new functionality that will probably stress the system a bit more, though.
  • edited February 2016
    Maybe my report is useless, because I'm using AC 1.49a and Unity 4.7.0 but when importing the script I have this error:

    Assets/Dev/1.51/RememberAnimator.cs(140,55): error CS0246: The type or namespace name `AnimatorControllerParameter' could not be found. Are you missing a using directive or an assembly reference?

    There's a way to fix this or I have to have the last AC version? Because it'll be a really useful script...
    Thanks anyway.
  • Bug reports are the most important kind of report, @2finger!

    The script is not compatible with Unity 4, it seems.  You'll have to get 5 if you want to make use of it - the version of AC is irrelevant.
This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.