Released 2019-08-12
Features
- Added several new examples:
Root Motiondemonstrates how to use serializables to determine whether each animation should use root motion or not.- [Pro-Only]
Hybrid Mini Gamedemonstrates 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
HybridAnimancerComponentfor managing a main Animator Controller alongside the regular Animancer functionality. - Added
AnimancerUtilities.EditModePlayto easily play animations in Edit Mode and used it in theDirectional Spritesexamples to show the correct sprite for the assigned animation sets. - [Pro-Only] Moved
AnimancerState.SpeedintoAnimancerNodeso 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.
- It now uses a private field to cache its value instead of retrieving it from the
- [Pro-Only] Added
AnimancerPlayable.Speed. - Moved
AnimancerState.IsPlayingand related functionality toAnimancerNodeso layers can be paused in the same way. - Added an implicit cast from
AnimancerLayertointso you can pass a layer reference intoPlay/CrossFademethods. - Added
AnimancerComponent.Disposemethods that take a key so the caller doesn't need to get and null check a state before callingAnimancerState.Dispose. - Added constructors and implicit casts to
ControllerState.Serializables. - Added
AnimationClip/Toggle LoopingContext Menu Function. - [Pro-Only] Unsealed
AnimancerState.StopsoControllerStatecan override it to reset itself to its default state. If you do not want this behaviour, you can set itsDefaultStateHashes = null.- [Pro-Only] Added
ControllerState.KeepStateOnStopwith a constructor parameter (default false) and a field in serializables.
- [Pro-Only] Added
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 Machinesexamples. - 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
WelcomeWindowwithReadMe(aScriptableObjectinstead of anEditorWindow). - Renamed
AnimancerLayer.IsPlaying()toIsAnyStatePlaying. AnimancerNode.IsPlayingis no longervirtual.MixerStatenow has a dedicated method forSetChildrenTimeinstead of overriding theTimeproperty becauseNormalizedTimewould not have worked properly.- Renamed
AnimancerPlayable.KeepPlayablesConnectedtoKeepChildrenConnected. - Replaced
EventfulAnimancerComponentwithSimpleEventReceiverwhich isn't anAnimancerComponent. - Changed the
ControllerState.Drawerto show the time of the current state instead of the playable's overall time (which was basically useless). - Renamed
AnimancerPlayable.CreatePlayabletoCreateand moved the graph name parameter out to an Editor-ConditionalSetNextGraphNamemethod so the caller doesn't access theObject.nameunnecessarily or use any #ifs. AnimancerComponentno longer sets theAnimator.enabled = trueevery time an animation is played. Anything that disables theAnimatorwill be responsible for re-enabling it.- Changed
InputBufferto allow a state to re-enter itself. - Removed
DocumentationandSupportcontext menu functions fromAnimancerComponentto avoid cluttering the menu.
Improvements
- Improved the
AnimancerComponentInspector:- Added the ability to
Ctrl + Shift + Clickon states in the Inspector to queue them to Cross Fade in a sequence (Ctrl + Clicknormally Cross Fades the state immediately). Also available as a context menu function. Ctrl + Clickon an animation while the graph is paused will nowPlayandEvaluateit immediately.- You can now drag and drop animations anywhere in the
AnimancerComponentInspector to create states for them. - You can now assign a new
AnimationClipto 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.
NamedAnimancerComponentEditornow draws the default animation on the same line as thePlay Automaticallytoggle.- 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 the ability to
- Added a setter for
AnimancerPlayable.IsGraphPlaying. - Added
IPlayableWrapperinterface to use forAnimancerNode.Parentso layers and states do not need separate hierarchy code. - Added
AnimancerNodeDraweras a common parent forAnimancerStateDrawerandAnimancerLayerDrawer. - Improved the error message for IK in Unity versions that do not support it.
- Grouped most string constants into a
Stringsclass. - 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.
ScriptableObjectEditornow only targets specific Animancer classes by default instead of allScriptableObjects(it was causing a conflict with Inspector Gadgets). You can uncomment the#define ANIMANCER_SCRIPTABLE_OBJECT_EDITORto 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.OnValidateto not remove null elements from theAnimationsarray because it was immediately removing any newly added elements when you click the + button or increase the size. - [Pro-Only] Fixed
ControllerState.Drawerto work properly with parameters and to only show them when expanded.
- Fixed
ClipState.ClipandControllerState.Controllersetters to dirty the weight of the newPlayable. - Fixed a bug in
InputBuffer.TrySetStatewhich caused it to attempt to enter the previously buffered state instead of the new one. - Fixed exceptions caused when an
AnimancerNodehas no parent. - Fixed the
GolfHitControllerexample script to be reusable if it is disabled and re-enabled. - Changed the
Sequence Coroutineexample to use aTextMeshso it doesn't need to reference the UI assembly (was causing problems in the Unity 2019.2 Beta).