Animancer v3.1

Released 2019-08-12

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

Features

  • Added several new examples:
    • Root Motion demonstrates how to use serializables to determine whether each animation should use root motion or not.
    • [Pro-Only] Hybrid Mini Game demonstrates how to use a default Animator Controller for some things and individual separate AnimationClips for others.
    • [Pro-Only] 3D Game Kit demonstrates how to translate the player Animator Controller based character from the 3D Game Kit to use Animancer.
  • [Pro-Only] Added HybridAnimancerComponent for managing a main Animator Controller alongside the regular Animancer functionality.
  • Added AnimancerUtilities.EditModePlay to easily play animations in Edit Mode and used it in the Directional Sprites examples to show the correct sprite for the assigned animation sets.
  • [Pro-Only] Moved AnimancerState.Speed into AnimancerNode so layers can have a custom speed too.
    • It now uses a private field to cache its value instead of retrieving it from the Playable, giving a slight performance increase.
  • [Pro-Only] Added AnimancerPlayable.Speed.
  • Moved AnimancerState.IsPlaying and related functionality to AnimancerNode so layers can be paused in the same way.
  • Added an implicit cast from AnimancerLayer to int so you can pass a layer reference into Play/CrossFade methods.
  • Added AnimancerComponent.Dispose methods that take a key so the caller doesn't need to get and null check a state before calling AnimancerState.Dispose.
  • Added constructors and implicit casts to ControllerState.Serializables.
  • Added AnimationClip/Toggle Looping Context Menu Function.
  • [Pro-Only] Unsealed AnimancerState.Stop so ControllerState can override it to reset itself to its default state. If you do not want this behaviour, you can set its DefaultStateHashes = null.
    • [Pro-Only] Added ControllerState.KeepStateOnStop with a constructor parameter (default false) and a field in serializables.

Changes

  • Reorganised the examples:
    • Changed the Layers example to use a tennis animation instead of golf so it actually makes sense to play it while running.
    • Organised all examples into sub-namespaces.
    • Removed unnecessary prefixes from classes in the State Machines examples.
    • Changed example scripts to put the [SerializeField] attribute on the same line as its field.
    • Reorganised the example art assets to put all Humanoid Animations in one folder and Props in another.
  • Replaced WelcomeWindow with ReadMe (a ScriptableObject instead of an EditorWindow).
  • Renamed AnimancerLayer.IsPlaying() to IsAnyStatePlaying.
  • AnimancerNode.IsPlaying is no longer virtual.
  • MixerState now has a dedicated method for SetChildrenTime instead of overriding the Time property because NormalizedTime would not have worked properly.
  • Renamed AnimancerPlayable.KeepPlayablesConnected to KeepChildrenConnected.
  • Replaced EventfulAnimancerComponent with SimpleEventReceiver which isn't an AnimancerComponent.
  • Changed the ControllerState.Drawer to show the time of the current state instead of the playable's overall time (which was basically useless).
  • Renamed AnimancerPlayable.CreatePlayable to Create and moved the graph name parameter out to an Editor-Conditional SetNextGraphName method so the caller doesn't access the Object.name unnecessarily or use any #ifs.
  • AnimancerComponent no longer sets the Animator.enabled = true every time an animation is played. Anything that disables the Animator will be responsible for re-enabling it.
  • Changed InputBuffer to allow a state to re-enter itself.
  • Removed Documentation and Support context menu functions from AnimancerComponent to avoid cluttering the menu.

Improvements

  • Improved the AnimancerComponent Inspector:
    • Added the ability to Ctrl + Shift + Click on states in the Inspector to queue them to Cross Fade in a sequence (Ctrl + Click normally Cross Fades the state immediately). Also available as a context menu function.
    • Ctrl + Click on an animation while the graph is paused will now Play and Evaluate it immediately.
    • You can now drag and drop animations anywhere in the AnimancerComponent Inspector to create states for them.
    • You can now assign a new AnimationClip to a state using the Inspector.
    • Added the ability to middle click on Inspector fields to reset them to their default value.
    • The context menu function to open the Playable Graph Visualizer will now be disabled when the visualizer is not present instead of not being shown at all.
    • NamedAnimancerComponentEditor now draws the default animation on the same line as the Play Automatically toggle.
    • By default, all Inspector labels will have spaces removed if the window isn't in wide mode so they are less likely to get truncated.
  • Added a setter for AnimancerPlayable.IsGraphPlaying.
  • Added IPlayableWrapper interface to use for AnimancerNode.Parent so layers and states do not need separate hierarchy code.
  • Added AnimancerNodeDrawer as a common parent for AnimancerStateDrawer and AnimancerLayerDrawer.
  • Improved the error message for IK in Unity versions that do not support it.
  • Grouped most string constants into a Strings class.
  • Cleaned up unnecessary #pragma warning disables.
  • Added AnimancerEditorUtilities.TempContent(SerializedProperty) to use the display name and tooltip of a property.

Fixes

  • Inspector fixes:
    • Fixed changing fade details in the Inspector to actually start fading properly.
    • ScriptableObjectEditor now only targets specific Animancer classes by default instead of all ScriptableObjects (it was causing a conflict with Inspector Gadgets). You can uncomment the #define ANIMANCER_SCRIPTABLE_OBJECT_EDITOR to have it apply to everything if you want (or define that symbol in your project settings).
    • Fixed the weight label display to go between white and grey in the dark theme (instead of black to grey).
    • Fixed indentation of ClipState.Serializable.StartTime.
    • Fixed a layout bug in NamedAnimancerComponentEditor.
    • Fixed NamedAnimancerComponent.OnValidate to not remove null elements from the Animations array because it was immediately removing any newly added elements when you click the + button or increase the size.
    • [Pro-Only] Fixed ControllerState.Drawer to work properly with parameters and to only show them when expanded.
  • Fixed ClipState.Clip and ControllerState.Controller setters to dirty the weight of the new Playable.
  • Fixed a bug in InputBuffer.TrySetState which caused it to attempt to enter the previously buffered state instead of the new one.
  • Fixed exceptions caused when an AnimancerNode has no parent.
  • Fixed the GolfHitController example script to be reusable if it is disabled and re-enabled.
  • Changed the Sequence Coroutine example to use a TextMesh so it doesn't need to reference the UI assembly (was causing problems in the Unity 2019.2 Beta).