Repository navigation
fix: NetworkAnimator conditional exit transitions - #4238
NoelStephensUnity wants to merge 5 commits into
Conversation
…p by originating state - Exit from the root state machine, or from a sub-state machine with no outgoing transition, resolves through the Entry node. - Trigger transitions into a sub-state machine resolve to its default and entry states. - The late-join lookup keeps every transition into a destination and picks the one from the current originating state. - Editor tests are guarded by COM_UNITY_MODULES_ANIMATION, with the define added to the test asmdef. - CHANGELOG entry.
A late-joining client starts in its default state, so requiring the originating state left it stuck there. Adds a runtime test that joins mid-transition from a non-default state.
|
@u-pr please review again. |
|
The update in A few items to consider for this revision: 1.
|
Transitions not in the table no longer fall back to the first entry for the destination, and a missing sub-state machine reference no longer throws while the table is built.
|
🤖 All three addressed in 739def1: strict origin match in TryGetTransitionInfo, null check before recursing, and the redundant ContainsKey removed on the authority side (kept on the receiver, where a missing layer table is valid and should not log). |
|
@u-pr please review again |
|
The latest changes in
The implementation and accompanying tests look solid and ready to merge. 🤖 Helpful? 👍/👎 |
CrossFade normalizes the transition duration to the current state's length, so cross-fading from the default state blended at the wrong speed when the clip lengths differ.
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## develop-3.x.x #4238 +/- ##
=================================================
+ Coverage 76.90% 77.27% +0.36%
=================================================
Files 159 159
Lines 27663 27749 +86
=================================================
+ Hits 21274 21442 +168
+ Misses 6389 6307 -82
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes
|
Purpose of this PR
User-PR: #4181
This PR resolves conditional transitions targeting an Exit node by following transitions through the parent state-machine hierarchy using
GetStateMachineTransitions().This supports both direct and nested Exit transitions, including transitions targeting another state machine. It prevents incorrect validation errors and allows late-joining clients to correctly synchronize the resulting animator state.
Jira ticket
Tracked by GitHub issue #3912.
Fix: #3912.
Changelog
NetworkAnimatornow resolves conditional transitions through sub-state-machine Exit nodes.Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing:
Manual testing doneVerified that a client joining during a
State A -> Exit -> State Btransition correctly synchronizes with the transition and reachesState Bwithout validation or destination-state errors.Automated tests:
Covered by existing automated testsCovered by new automated testsAdded EditMode coverage for direct and nested Exit transitions, including transitions targeting another state machine.
Does the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?Up-port
Not needed; this PR targets
develop-3.x.x.Backports
#4240