Released 2019-08-12
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 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
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 theDirectional Sprites
examples to show the correct sprite for the assigned animation sets. - [Pro-Only] Moved
AnimancerState.Speed
intoAnimancerNode
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.
- It now uses a private field to cache its value instead of retrieving it from the
- [Pro-Only] Added
AnimancerPlayable.Speed
. - Moved
AnimancerState.IsPlaying
and related functionality toAnimancerNode
so layers can be paused in the same way. - Added an implicit cast from
AnimancerLayer
toint
so you can pass a layer reference intoPlay
/CrossFade
methods. - Added
AnimancerComponent.Dispose
methods 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.Serializable
s. - Added
AnimationClip/Toggle Looping
Context Menu Function. - [Pro-Only] Unsealed
AnimancerState.Stop
soControllerState
can 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.KeepStateOnStop
with 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 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
withReadMe
(aScriptableObject
instead of anEditorWindow
). - Renamed
AnimancerLayer.IsPlaying()
toIsAnyStatePlaying
. AnimancerNode.IsPlaying
is no longervirtual
.MixerState
now has a dedicated method forSetChildrenTime
instead of overriding theTime
property becauseNormalizedTime
would not have worked properly.- Renamed
AnimancerPlayable.KeepPlayablesConnected
toKeepChildrenConnected
. - Replaced
EventfulAnimancerComponent
withSimpleEventReceiver
which isn't anAnimancerComponent
. - 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
toCreate
and moved the graph name parameter out to an Editor-ConditionalSetNextGraphName
method so the caller doesn't access theObject.name
unnecessarily or use any #ifs. AnimancerComponent
no longer sets theAnimator.enabled = true
every time an animation is played. Anything that disables theAnimator
will be responsible for re-enabling it.- Changed
InputBuffer
to allow a state to re-enter itself. - Removed
Documentation
andSupport
context menu functions fromAnimancerComponent
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 nowPlay
andEvaluate
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 thePlay 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 the ability to
- Added a setter for
AnimancerPlayable.IsGraphPlaying
. - Added
IPlayableWrapper
interface to use forAnimancerNode.Parent
so layers and states do not need separate hierarchy code. - Added
AnimancerNodeDrawer
as a common parent forAnimancerStateDrawer
andAnimancerLayerDrawer
. - 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 disable
s. - 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 allScriptableObjects
(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 theAnimations
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
andControllerState.Controller
setters to dirty the weight of the newPlayable
. - 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 Coroutineexample to use aTextMesh
so it doesn't need to reference the UI assembly (was causing problems in the Unity 2019.2 Beta).