Animancer v2.0

Released 2018-10-08

When upgrading to a newer version of Animancer, you must delete any previous version from your project first.

Major Features

  • Added a website hosted at https://kybernetik.com.au/animancer to replace the old PDF User Manual.
  • [Pro-Only] Added AnimatorControllerState for playing AnimatorControllers, as well as FloatParameterControllerState for wrapping a float parameter and similar classes for Vector2 and Vector3.
  • Added AnimancerController.UpdateMode to wrap Animator.updateMode for intercepting UnscaledTime mode.
  • Added methods for enabling IK to AnimancerState.
    • Added ClipState.DefaultApplyFootIK to disable foot IK by default since the Playables API has it enabled by default.
  • Added WelcomeWindow to show a link to the documentation when Animancer is first imported or updated.
  • Added demo scenes for a simple example and a more complex state machine implementation.

Minor Features

  • Added AnimancerPlayable.MaxCrossFadeNewDepth (default 5) to give usage warnings if it creates too many states for a single clip.
  • Added AnimancerPlayable.AddState (and an AnimancerController wrapper) to register any state with a given key.
  • Added AnimancerState.OutputWeight which multiplies the Weight of the state by the Weight of each of its parents to determine how much it affects the final output of the PlayableGraph.
  • Added AnimancerPlayable.FastComparer to allow the dictionary of registered states to avoid the slow UnityEngine.Object overloaded equals operator.
  • Added AnimancerPlayable.Evaluate(float deltaTime) and a wrapper in AnimancerController.
  • Added AnimancerState.RemainingDuration.
  • Added AnimationMixer.NormalizeDurations to average all child state durations.
  • [Pro-Only] Added public AnimancerLayer.Initialize to re-initialize a layer after it has been disposed.

Improvements

  • Massively reworked the Inspector.
    • It now hides the referenced Animator component if it's on the same object. While hidden, it shows only the fields that are relevant to Animancer with warnings for values that are unsupported.
  • Added [HelpUrl] to AnimancerController now that the documentation is online.
  • [Editor-Only] Added a max layer count and a warning if you exceed that limit in case you do it unintentionally. The default is 4, but it can be changed with AnimancerPlayable.SetMaxLayerCount.

Changes

  • Restructured the directory layout to put the editor scripts in the regular assembly (in an Editor namespace and #if UNITY_EDITOR regions) so that they can make use of internal members instead of leaving them public.
  • Removed WrapMode support since it didn't work properly. ClipState now just uses the AnimationClip.isLooping property which is set in the model's import settings. If you want to emulate WrapMode.Once you can just stop the animation using the OnEnd event.
  • Split AnimancerController functionality for playing animations automatically into LegacyAnimancerController and combined it with NamedAnimancerController.
  • Removed all calls to AnimancerPlayable.PlayGraph except the one in AnimancerController.OnEnable. If the user stops the graph they should be responsible for starting it again and this saves some performance.
  • Changed AnimancerState.Duration to be "The amount of time the animation will take to play fully at its current Speed" instead of just a wrapper around the AnimationClip.length.
  • Restructured all states to use constructors instead of CreateState<T> so they can have readonly fields.
  • Changed the abstract AnimancerState.Playable to GetPlayable() so that derived classes can use the Playable member name for their specific readonly playable field.
    • Added protected AnimancerState._BasePlayable field which needs to be set in the child class constructor and removed all the Playable Casts methods.
  • Added AnimancerState.MainAsset to show the AnimationClip in the Inspector for ClipState and the AnimatorController for AnimatorControllerState.
  • [Pro-Only] Changed AnimancerLayer.AcquirePortIndex to AddChild so it can't be called without using the acquired port correctly.
  • Made AnimancerState.Time virtual so that most states do not cache their time since only ClipStates actually need to check it every update and so AnimationMixers can propogate set time calls to their children.
  • Added AnimancerStateInspector and AnimancerState.GetInspector so states can define their own overrides of the Inspector behaviour.
  • Removed AnimancerPlayable.OnGraphStart and OnGraphStop.
  • Removed HashedAnimancerController since it was unlikely to actually be used.

Fixes

  • Fixed ClipState Inspector time bar and slider to clamp when the animation is not looping.
  • [Pro-Only] AnimancerLayer.Stop now sets the Weight to 0 for when a layer fade finishes.