Sitelet https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/4142
Skip to content

chore: editor namespace auto upgrade - #4142

Draft
NoelStephensUnity wants to merge 11 commits into
develop-3.x.xfrom
chore/editor-namespace-auto-upgrade
Draft

chore: editor namespace auto upgrade#4142
NoelStephensUnity wants to merge 11 commits into
develop-3.x.xfrom
chore/editor-namespace-auto-upgrade

Conversation

@NoelStephensUnity

Copy link
Copy Markdown
Member

Purpose of this PR

This PR handles the auto-upgrade namespace change from Unity.Netcode.Editor to Unity.Netcode.GameObjects.Editor.
It also includes a job that can be manually triggered to validate the auto-upgrade or the job itself could be added to nightly or the like.

Jira ticket

MTT-15570

Changelog

NA

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

Automated tests:

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

Does the change require QA team to:

  • Review automated tests?
    • Currently, it is only wired into the comment trigger ("apiupdater").
    • @michalChrobot Feel free to adjust this if you want it to automatically run under specific conditions.
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Up-port

None

Backports

None

marking all unity.netcode.editor public API as having moved to a new namespace in order to auto-upgrade users.
Adding a project verification test that can be triggered by typing "apiupdater" as a comment.
The project added verifies that the entire public API within the unity.netcode.editor namespace is auto-upgraded without compilation errors.
@NoelStephensUnity
NoelStephensUnity requested review from a team and EmandM as code owners August 24, 2026 20:29

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The relocation metadata covers the unconditional public editor API, but the new validation harness has a configuration-specific coverage gap and cannot be run reliably from paths containing spaces.

Reviewed commit dcf9a26

🤖 Helpful? 👍/👎

Comment thread apiupdaterproject/run-upgrade-test.ps1 Outdated
Comment thread apiupdaterproject/run-upgrade-test.ps1 Outdated
Removed obsolete custom property drawer for NetworkObject.OwnershipStatus.
Handling paths with spaces.
Remove this too as we don't need that work around.
Comment thread apiupdaterproject/.gitignore
Comment thread apiupdaterproject/run-upgrade-test.ps1 Outdated
@@ -0,0 +1,121 @@
# API updater upgrade-path project

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This README has too much info. The README from this project doesn't need info on how the upgrade was implemented, it just needs info on how it works.

If you want this project to be used also for future upgrades then this README shouldn't have any references to the 2.x -> 3.x upgrade specifically, otherwise future us might think we can pull this project out once that upgrade is released.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project and the tests associated with it will not be pertinent once v2.x.x becomes deprecated.
But I can remove the extra info...leaving it only provides the context as to why it is there in the first place.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be much more straight forward now.

{
"disableProjectUpdate": false,
"dependencies": {
"com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to have N4E in here so we can be sure the upgrade doesn't introduce a conflict with N4E

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was tested extensively locally. Nothing wrapped in UNIFIED_NETCODE is impacted by the namespace migration since anything that does reference NGO editor classes(etc) already has the change applied and no user has any script that could cause conflicts.

This validates without N4E an NGO users upgrading from v2.x to v3.x will automatically have everything that needs to be updated...updated.

@codecov-github-com

codecov-github-com Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@              Coverage Diff               @@
##           develop-3.x.x    #4142   +/-   ##
==============================================
  Coverage          78.00%   78.00%           
==============================================
  Files                153      153           
  Lines              26260    26260           
==============================================
  Hits               20483    20483           
  Misses              5777     5777           
Flag Coverage Δ
NGOv2_project_testproject_ubuntu_pinnedTrunk 77.58% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
com.unity.netcode.gameobjects 78.00% <ø> (ø)

ℹ️ Need help interpreting these results?

@NoelStephensUnity
NoelStephensUnity marked this pull request as draft August 25, 2026 20:13
Adjusting README to be less verbose.
Adding agent.md file to keep context.
Correction... making a single PYTHON script that stays in alignment with our CI scripting language usage.
@NoelStephensUnity

Copy link
Copy Markdown
Member Author

/ci apiupdater

Fixing issue with path
@NoelStephensUnity

Copy link
Copy Markdown
Member Author

/ci apiupdater

Project version correction.
Removal of 600.7.0a5 injected assemblies.
Updating agent knowledge.
@NoelStephensUnity

Copy link
Copy Markdown
Member Author

/ci apiupdater

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants