From 8dc8708f16dea07e8f690e6c56e29d875b9d0e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Sun, 4 Oct 2026 12:23:00 +0200 Subject: [PATCH 1/9] Incorporated ShadowPackage changes --- .../Editor/InScenePlacedProcessor.cs | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs b/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs index 4314aa243d..8c326e5107 100644 --- a/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs +++ b/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs @@ -5,20 +5,47 @@ using UnityEngine; using UnityEngine.SceneManagement; +#if UNITY_7000_0_OR_NEWER +using UnityEditor.Build.Content; +#endif + namespace Unity.Netcode.GameObjects.Editor { /// - /// A that sets the property to true for all s in the scene. /// Ensures that InScenePlaced is always true for all objects in the scene. /// /// - /// This will always run as the game enters the scene, + /// This will always run as a scene is loaded in playmode or while processed for a player build. /// +#if UNITY_7000_0_OR_NEWER + internal class SetInScenePlaced : AssetPostprocessor + { + public override uint GetVersion() => 1; + + public override int GetPostprocessOrder() => 0; + + void OnProcessScene(Scene scene, SceneImportContext sceneImportContext) + { + InScenePlaceChecks.ReportSceneIssues(scene, sceneImportContext.awakeDidRun); + } + } +#else internal class SetInScenePlaced : IProcessSceneWithReport { public int callbackOrder => 0; + public void OnProcessScene(Scene scene, BuildReport report) + { + InScenePlaceChecks.ReportSceneIssues(scene, Application.isPlaying); + } + } +#endif + + internal static class InScenePlaceChecks + { + public static void ReportSceneIssues(Scene scene, bool hasAwakeRun) { var log = new ContextualLogger(); log.AddInfo(scene.name, scene.handle); @@ -42,15 +69,15 @@ public void OnProcessScene(Scene scene, BuildReport report) continue; } - // If already marked, the do nothing. + // If already marked, do nothing. if (networkObject.InScenePlaced) { continue; } networkObject.InScenePlaced = true; - // Will not be true when making a build and the values are serialized. - networkObject.InScenePlacedPostProcessorMarkedDuringRuntime = Application.isPlaying; + // Mark that awake has run so this could have been a dynamically instantiated object. + networkObject.InScenePlacedPostProcessorMarkedDuringRuntime = hasAwakeRun; } } } From 1948b535cab295fc39d8da6435c83bd8ecd3f87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Mon, 5 Oct 2026 13:46:26 +0200 Subject: [PATCH 2/9] package and changelog update --- com.unity.netcode.gameobjects/CHANGELOG.md | 8 ++++++-- com.unity.netcode.gameobjects/package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 15f400f9db..9be4e4fba7 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -12,8 +12,6 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Changed -- Updated Netcode for Entities dependency to 7.1.0 - ### Deprecated ### Removed @@ -24,6 +22,12 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Obsolete +## [3.1.0] - 2026-10-04 + +### Changed + +- Updated Netcode for Entities dependency to 7.1.0 + ## [3.0.0] - 2026-09-14 ### Added diff --git a/com.unity.netcode.gameobjects/package.json b/com.unity.netcode.gameobjects/package.json index cce070c91f..bf083fd172 100644 --- a/com.unity.netcode.gameobjects/package.json +++ b/com.unity.netcode.gameobjects/package.json @@ -2,7 +2,7 @@ "name": "com.unity.netcode.gameobjects", "displayName": "Netcode for GameObjects", "description": "Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.", - "version": "3.1.0", + "version": "3.1.1", "unity": "6000.7", "unityRelease": "0b1", "dependencies": { From 1b42685a01e40d3da189abc88160b3a36744d1c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Mon, 5 Oct 2026 14:16:48 +0200 Subject: [PATCH 3/9] corrected ngo-publish job --- .yamato/ngo-publish.yml | 2 +- Tools/scripts/ReleaseAutomation/release_config.py | 2 +- Tools/scripts/Utils/general_utils.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.yamato/ngo-publish.yml b/.yamato/ngo-publish.yml index 81f9f57b3b..ecd6f2fc70 100644 --- a/.yamato/ngo-publish.yml +++ b/.yamato/ngo-publish.yml @@ -3,7 +3,7 @@ ngo_release_preparation: agent: { type: Unity::VM, flavor: b1.small, image: package-ci/ubuntu-22.04:v4 } triggers: recurring: - - branch: develop-2.0.0 # We make new releases from this branch + - branch: develop-3.x.x # We make new releases from this branch frequency: "10 ? * 1" # Runs every Sunday at 10:00 AM commands: - pip install PyGithub diff --git a/Tools/scripts/ReleaseAutomation/release_config.py b/Tools/scripts/ReleaseAutomation/release_config.py index fc968fd160..ae99adec2c 100644 --- a/Tools/scripts/ReleaseAutomation/release_config.py +++ b/Tools/scripts/ReleaseAutomation/release_config.py @@ -52,7 +52,7 @@ def __init__(self): self.changelog_path = 'com.unity.netcode.gameobjects/CHANGELOG.md' self.validation_exceptions_path = './ValidationExceptions.json' self.github_repo = 'Unity-Technologies/com.unity.netcode.gameobjects' - self.default_repo_branch = 'develop-2.0.0' # Changelog and package version change will be pushed to this branch + self.default_repo_branch = 'develop-3.x.x' # Changelog and package version change will be pushed to this branch self.yamato_project_id = '1201' self.command_to_run_on_release_branch = make_package_release_ready diff --git a/Tools/scripts/Utils/general_utils.py b/Tools/scripts/Utils/general_utils.py index 0b822ab8d9..cd7ae483a9 100644 --- a/Tools/scripts/Utils/general_utils.py +++ b/Tools/scripts/Utils/general_utils.py @@ -132,10 +132,9 @@ def update_changelog(changelog_path, new_version, add_unreleased_template=False) with open(changelog_path, 'r', encoding='UTF-8') as f: changelog_text = f.read() - # This pattern finds a line starting with '###', followed by its newline, - # and then two more lines that contain only whitespace. + # This pattern finds a line starting with '###' followed only by blank lines up to the next heading or end of file. # The re.MULTILINE flag allows '^' to match the start of each line. - pattern = re.compile(r"^###.*\n\n\n", re.MULTILINE) + pattern = re.compile(r"^###[^\n]*\n(?:[ \t]*\n)*(?=##|\Z)", re.MULTILINE) # Replace every match with an empty string. The goal is to remove empty CHANGELOG subsections. cleaned_content = pattern.sub('', changelog_text) From 0c76ca750064c036f92fbae46e62d5f1f279157c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Mon, 5 Oct 2026 14:29:17 +0200 Subject: [PATCH 4/9] corrected re.search --- Tools/scripts/Utils/general_utils.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Tools/scripts/Utils/general_utils.py b/Tools/scripts/Utils/general_utils.py index cd7ae483a9..ca45a29953 100644 --- a/Tools/scripts/Utils/general_utils.py +++ b/Tools/scripts/Utils/general_utils.py @@ -132,12 +132,20 @@ def update_changelog(changelog_path, new_version, add_unreleased_template=False) with open(changelog_path, 'r', encoding='UTF-8') as f: changelog_text = f.read() - # This pattern finds a line starting with '###' followed only by blank lines up to the next heading or end of file. + # This pattern finds a line starting with '###' followed only by blank lines up to the next heading or end of section. # The re.MULTILINE flag allows '^' to match the start of each line. pattern = re.compile(r"^###[^\n]*\n(?:[ \t]*\n)*(?=##|\Z)", re.MULTILINE) - # Replace every match with an empty string. The goal is to remove empty CHANGELOG subsections. - cleaned_content = pattern.sub('', changelog_text) + # Replace every match within the [Unreleased] section with an empty string. The goal is to remove empty CHANGELOG subsections. + # Released sections are left untouched since some of them use '###' for their version heading. + cleaned_content = changelog_text + unreleased_section = re.search(r'(?ms)^## \[Unreleased\].*?(?=^## \[|\Z)', changelog_text) + if unreleased_section: + cleaned_content = ( + changelog_text[:unreleased_section.start()] + + pattern.sub('', unreleased_section.group(0)) + + changelog_text[unreleased_section.end():] + ) if version_header_to_find_if_exists in changelog_text: warnings.warn(f"A changelog entry for version '{new_version}' already exists. The script will just remove Unreleased section and its content.") From b4e8c70886a54e2b0bedcd7f9f52bb3445826caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Tue, 6 Oct 2026 10:53:16 +0200 Subject: [PATCH 5/9] added validation exceptions from false-positive failure --- ValidationExceptions.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ValidationExceptions.json b/ValidationExceptions.json index c6b271631e..1396d4a7d9 100644 --- a/ValidationExceptions.json +++ b/ValidationExceptions.json @@ -1,4 +1,15 @@ { - "ErrorExceptions": [], + "ErrorExceptions": [ + + { + + "ValidationTest": "NDA Keyword Validation", + + "ExceptionMessage": "#if UNITY_7000_0_OR_NEWER", + + "PackageVersion": "3.1.1" + + } + ], "WarningExceptions": [] } From 15ebfdb863f845b48311945eaedac7331124d2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Tue, 6 Oct 2026 12:50:03 +0200 Subject: [PATCH 6/9] updated ValidationExceptions --- ValidationExceptions.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ValidationExceptions.json b/ValidationExceptions.json index 1396d4a7d9..d258246b0c 100644 --- a/ValidationExceptions.json +++ b/ValidationExceptions.json @@ -1,14 +1,14 @@ { "ErrorExceptions": [ - { - "ValidationTest": "NDA Keyword Validation", - "ExceptionMessage": "#if UNITY_7000_0_OR_NEWER", - "PackageVersion": "3.1.1" - + }, + { + "ValidationTest": "NDA Keyword Validation", + "ExceptionMessage": "File 'Editor/InScenePlacedProcessor.cs' contains deny-listed keyword pattern '(? Date: Tue, 6 Oct 2026 13:49:25 +0200 Subject: [PATCH 7/9] Updated ValidationExceptions place --- Tools/scripts/ReleaseAutomation/release_config.py | 2 +- Tools/scripts/release.py | 2 +- .../ValidationExceptions.json | 0 .../ValidationExceptions.json.meta | 7 +++++++ 4 files changed, 9 insertions(+), 2 deletions(-) rename ValidationExceptions.json => com.unity.netcode.gameobjects/ValidationExceptions.json (100%) create mode 100644 com.unity.netcode.gameobjects/ValidationExceptions.json.meta diff --git a/Tools/scripts/ReleaseAutomation/release_config.py b/Tools/scripts/ReleaseAutomation/release_config.py index ae99adec2c..ddd35bb366 100644 --- a/Tools/scripts/ReleaseAutomation/release_config.py +++ b/Tools/scripts/ReleaseAutomation/release_config.py @@ -50,7 +50,7 @@ class ReleaseConfig: def __init__(self): self.manifest_path = 'com.unity.netcode.gameobjects/package.json' self.changelog_path = 'com.unity.netcode.gameobjects/CHANGELOG.md' - self.validation_exceptions_path = './ValidationExceptions.json' + self.validation_exceptions_path = 'com.unity.netcode.gameobjects/ValidationExceptions.json' self.github_repo = 'Unity-Technologies/com.unity.netcode.gameobjects' self.default_repo_branch = 'develop-3.x.x' # Changelog and package version change will be pushed to this branch self.yamato_project_id = '1201' diff --git a/Tools/scripts/release.py b/Tools/scripts/release.py index 4693d90bc9..b55ce22ba5 100644 --- a/Tools/scripts/release.py +++ b/Tools/scripts/release.py @@ -88,7 +88,7 @@ def make_package_release_ready(manifest_path, changelog_path, validation_excepti if __name__ == '__main__': manifest_path = 'com.unity.netcode.gameobjects/package.json' changelog_path = 'com.unity.netcode.gameobjects/CHANGELOG.md' - validation_exceptions_path = './ValidationExceptions.json' + validation_exceptions_path = 'com.unity.netcode.gameobjects/ValidationExceptions.json' package_version = get_package_version_from_manifest(manifest_path) make_package_release_ready(manifest_path, changelog_path, validation_exceptions_path, package_version) diff --git a/ValidationExceptions.json b/com.unity.netcode.gameobjects/ValidationExceptions.json similarity index 100% rename from ValidationExceptions.json rename to com.unity.netcode.gameobjects/ValidationExceptions.json diff --git a/com.unity.netcode.gameobjects/ValidationExceptions.json.meta b/com.unity.netcode.gameobjects/ValidationExceptions.json.meta new file mode 100644 index 0000000000..aa2f0e1fbd --- /dev/null +++ b/com.unity.netcode.gameobjects/ValidationExceptions.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8489b8a7e9ea4376a49234263c234efd +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From de5d6506910dc57e930acf157993248e4985fbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Tue, 6 Oct 2026 14:12:40 +0200 Subject: [PATCH 8/9] removal of ValidationExceptiosn for pack job --- .yamato/package-pack.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.yamato/package-pack.yml b/.yamato/package-pack.yml index 7554274fe8..c2855ad491 100644 --- a/.yamato/package-pack.yml +++ b/.yamato/package-pack.yml @@ -42,6 +42,10 @@ package_pack_-_ngo_{{ platform.name }}: variables: XRAY_PROFILE: "gold ./pvpExceptions.json rme" commands: + # Remove ValidationExceptions.json and its .meta file if they exist. For this specific test it's necessary (otherwise we want to keep them since we use those for release). + - rm -f com.unity.netcode.gameobjects/ValidationExceptions.json + - rm -f com.unity.netcode.gameobjects/ValidationExceptions.json.meta + - upm-pvp pack "com.unity.netcode.gameobjects" --output upm-ci~/packages - upm-pvp xray --packages "upm-ci~/packages/com.unity.netcode.gameobjects*.tgz" --results pvp-results - upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results --allow-missing From da3deba96112cf577cb8d6d4d9e4cb4821bd67ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Chrobot?= Date: Tue, 6 Oct 2026 15:42:30 +0200 Subject: [PATCH 9/9] added ifdef --- .yamato/package-pack.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.yamato/package-pack.yml b/.yamato/package-pack.yml index c2855ad491..50ce3587d9 100644 --- a/.yamato/package-pack.yml +++ b/.yamato/package-pack.yml @@ -43,8 +43,13 @@ package_pack_-_ngo_{{ platform.name }}: XRAY_PROFILE: "gold ./pvpExceptions.json rme" commands: # Remove ValidationExceptions.json and its .meta file if they exist. For this specific test it's necessary (otherwise we want to keep them since we use those for release). +{% if platform.name == "win" %} + - if exist com.unity.netcode.gameobjects\ValidationExceptions.json del /f /q com.unity.netcode.gameobjects\ValidationExceptions.json + - if exist com.unity.netcode.gameobjects\ValidationExceptions.json.meta del /f /q com.unity.netcode.gameobjects\ValidationExceptions.json.meta +{% else %} - rm -f com.unity.netcode.gameobjects/ValidationExceptions.json - rm -f com.unity.netcode.gameobjects/ValidationExceptions.json.meta +{% endif %} - upm-pvp pack "com.unity.netcode.gameobjects" --output upm-ci~/packages - upm-pvp xray --packages "upm-ci~/packages/com.unity.netcode.gameobjects*.tgz" --results pvp-results