Fix Any state transitions will be created from SSMs:
- Due to an implementation error, creating Any state transitions previously did not have any effect in the graph. - This now creates Any state from the root machine. - Sub-state machines "cannot" have Any state transitions created directly from them. - Internally, Any always comes from the root state machine, but visually in the graph, it will come from the sub-state machine.
This commit is contained in:
@@ -23,6 +23,14 @@ namespace AnimatorAsCode.V1
|
||||
AnimatorRoot = animatorRoot;
|
||||
}
|
||||
|
||||
internal AacFlStateMachine RootMachine()
|
||||
{
|
||||
if (ParentMachine != null) return ParentMachine.RootMachine();
|
||||
if (this is AacFlStateMachine root)
|
||||
return root;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Move the node the left of the other node in the graph.
|
||||
public TNode LeftOf(AacAnimatorNode otherNode) => MoveNextTo(otherNode, -1, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user