Animancer v4.1

Released 2020-02-21

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

Features

  • Replaced ExposedCurve with AnimatedProperty:
    • Instead of a ScriptableObject that serializes the curve separately and evaluates it manually, it now accesses the value directly from the animation stream.
    • It automatically blends the value according to the weights of all current animations.
    • It uses the Animation Jobs system implemented in Unity 2019.1+.
    • The Uneven Ground example no longer supports older Unity versions.
    • The ExposedCurve script can still be downloaded from the Inverse Kinematics page if you need it. See the Help page for contact options if you believe it should be added back into Animancer itself.
  • Added PlayableAssetState.SetBindings and PlayableAssetTransition.Bindings to support Timelines with multiple tracks, including non-animation tracks.
    • This feature is still fairly experimental so please use the contact options on the Help page if you have any issues with it.
  • AnimancerPlayable.KeepChildrenConnected now defaults to true for Generic Rigs because it has better Performance for Sprite animations (and is similarly efficient for other Generic animations).

Improvements

  • Improved Mixers:
    • The ManualMixerState.States array is no longer directly exposed because setting its elements did not reparent the states as children of the mixer.
    • Now you have to use ChildCount, GetChild, and SetChild.
    • Removed MixerState.PortCount since it was identical to ChildCount.
    • Cleaned up various implementation details.
  • Improved Object Pooling:
    • ObjectPool.Count can now be set to pre-allocate items.
    • Added ObjectPool.SetMinCount to easily pre-allocate items.
    • AnimancerState now exposes the EventPoolCount and SetMinEventPoolCount in addition to the existing EventPoolCapacity.
  • PlayableAssetState.Length is now cached so it no longer allocates garbage all the time (not sure why Unity's PlayableAsset.length would do so in the first place though).
  • Added AnimancerNode.CreatePlayable, RecreatePlayable, and RecreatePlayableRecursive to standardise their initialization.
    • The TransitionPreviewWindow now uses them instead of totally destroying and recreating the states to ensure that the playables are correct without losing their drawer state. #23
    • Added AnimancerState.ChangeMainObject to standardise the destruction and re-creation of playables when the AnimancerState.MainObject is changed.
  • Added ITransitionDetailed.IsValid to determine if a valid state can be created before use.
  • Added Validate.CanBePlayed to ensure that a node has a valid playable and parent.
  • Improved the output of AnimancerNode.AppendDetails.

Changes

  • Changed AnimancerLayer.maxStateDepth to a property with a conditional SetMaxStateDepth method so it can be properly removed when UNITY_ASSERTIONS is not defined.
  • Renamed AnimancerState.NewTime to RawTime.
  • Renamed AnimancerState.EventUpdatable to EventRunner.
  • Moved the AnimancerNode.IsValid extension method from AnimancerEditorUtilities to AnimancerUtilities.
  • Adjusted the area highlighted by the TransitionDrawer for the currently reviewing transition to include the foldout arrow.

Fixes

  • Fixed AnimancerEvent.Sequence pooling to work correctly.
  • Added [CanEditMultipleObjects] to DummyObjectEditor.
  • TransitionPreviewWindow now supports Scriptable Render Pipelines. #17
  • Fixed AnimancerPlayable.LateUpdate.IsConnected to properly disconnect it when set to false.
  • The AnimancerState.Time setter now delays assigning the value to the playable until the next update since weights cannot be applied during the late update (so the time and weight could be out of sync for a frame if set during an event). #25
  • Fixed the 3D Game Kit example character to stand on moving platforms properly by only accessing the CharacterController.isGrounded flag once per frame right after moving and using that value for everything. #24
  • Destroyed AnimancerNodes no longer get updated.
  • Fixed potential NullReferenceException in MixerState.ApplySynchroniseChildren.
  • Fixed errors in TransitionPreviewWindow when the target transition is not valid.