Skip to content

fix: resolve NetworkAnimator conditional exit transitions - #4181

Open
ZakyB wants to merge 1 commit into
Unity-Technologies:develop-3.x.xfrom
ZakyB:fix/networkanimator-conditional-exit
Open

ZakyB wants to merge 1 commit into
Unity-Technologies:develop-3.x.xfrom
ZakyB:fix/networkanimator-conditional-exit

Conversation

@ZakyB

@ZakyB ZakyB commented Oct 3, 2026 •

Copy link
Copy Markdown

Purpose of this PR

Fixes #3912.

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.

Changelog

com.unity.netcode.gameobjects

  • Fixed: NetworkAnimator now resolves conditional transitions through sub-state-machine Exit nodes.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing:

  • Manual testing done

Verified that a client joining during a State A -> Exit -> State B transition correctly synchronizes with the transition and reaches State B without validation or destination-state errors.

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Added 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

Worth considering for supported 2.x branches, as the issue was also reported on NGO 2.12.0.

@ZakyB
ZakyB requested a review from a team as a code owner October 3, 2026 23:08
@u-pr

u-pr Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Some settings were ignored in '.pr_agent.toml (repository root)' repo settings

Check the configuration's TOML syntax, permitted settings, and size limit. See the error below.


Error message:
Ignored prohibited settings: github_app.handle_pr_actions. Permitted settings were applied.

Configuration content:
# This is the configuration for the u-pr bot
# https://github.cds.internal.unity3d.com/unity/u-pr
# For configuration of this file:
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/

[github_app]
handle_pr_actions = ['opened', 'ready_for_review']  # PR events that auto-run pr_commands
pr_commands       = ["/harness-review"]             # what runs on those events
reviewer_commands = ["/harness-review"]             # what runs when @u-pr is added as reviewer

@cla-assistant-unity

cla-assistant-unity Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ZakyB
ZakyB force-pushed the fix/networkanimator-conditional-exit branch from 92acdad to 4268267 Compare October 3, 2026 23:14
@ZakyB ZakyB changed the title Fix NetworkAnimator conditional exit transitions fix: resolve NetworkAnimator conditional exit transitions Oct 3, 2026
@NoelStephensUnity NoelStephensUnity added stat:Investigating Issue is currently being investigated Tracking Has been added to tracking labels Oct 8, 2026
@NoelStephensUnity

Copy link
Copy Markdown
Member

@ZakyB
First pass glance, this looks like a nice contribution. We have marked this PR for a follow up. It could be towards the end of this month or slightly after as our time is allocated towards unified netcode. Just letting you know that we will be following up on this.
👍 🥇

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat:Investigating Issue is currently being investigated Tracking Has been added to tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NetworkAnimator: Conditional triggered transitions to Exit node log false errors

2 participants