Unity has stated that they will not fix this bug.
RESOLUTION NOTE: It's an edge case of the ScriptPlayable, and there is also a workaround by inserting an AnimationLayerMixerPlayable into the stream.
ProcessRootMotion
and ProcessAnimation
methods of the AnimationJob will not be executed if the AnimationScriptPlayable
is output to a ScriptPlayable
and it’s not the first(at index 0) input of the ScriptPlayable
.
- Open the "SampleScene".
- Enter play mode.
- In the Game view, you will see "Connect to Port 0" and the value of the counter is increasing.
- Click the "Switch Connection" button, and you will see "Connect to Port 1" and the value of the counter has unexpectedly stopped increasing.
View the topology of the PlayableGraph in the PlayableGraph Monitor (Tools/Bamboo/PlayableGraph Monitor).
If a ScriptPlayable<T>
(directly or indirectly) outputs to an AnimationPlayableOutput
, only its first output port is valid.
Connecting to other output ports will not trigger updates for this ScriptPlayable<T>
and its child Playable
s.
You should always ensure that the ScriptPlayable<T>
connected to the AnimationPlayableOutput
has at most 1 input port and 1 output port.
You can temporarily fix this issue by inserting an AnimationLayerMixerPlayable
between the ScriptPlayable
and the AnimationScriptPlayable
.
Please refer to AnimationJobTest_TempFix.cs for more details.