From 78a997965b50e9f5147763ce6ed5c96459997105 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 24 Aug 2026 15:19:36 -0500 Subject: [PATCH 01/12] update marking all unity.netcode.editor public API as having moved to a new namespace in order to auto-upgrade users. --- .../Configuration/NetcodeForGameObjectsProjectSettings.cs | 2 ++ .../Editor/Configuration/NetworkPrefabProcessor.cs | 2 ++ .../Editor/Configuration/NetworkPrefabsEditor.cs | 2 ++ com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs | 6 ++++++ .../Editor/InScenePlacedProcessor.cs | 2 +- com.unity.netcode.gameobjects/Editor/NetcodeEditorBase.cs | 2 ++ .../Editor/NetworkBehaviourEditor.cs | 2 ++ .../Editor/NetworkManagerEditor.cs | 2 ++ .../Editor/NetworkManagerHelper.cs | 2 ++ com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs | 3 +++ .../Editor/NetworkRigidbodyBaseEditor.cs | 2 ++ .../Editor/NetworkTransformEditor.cs | 2 ++ 12 files changed, 28 insertions(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Editor/Configuration/NetcodeForGameObjectsProjectSettings.cs b/com.unity.netcode.gameobjects/Editor/Configuration/NetcodeForGameObjectsProjectSettings.cs index 05f83876bd..c916494ba0 100644 --- a/com.unity.netcode.gameobjects/Editor/Configuration/NetcodeForGameObjectsProjectSettings.cs +++ b/com.unity.netcode.gameobjects/Editor/Configuration/NetcodeForGameObjectsProjectSettings.cs @@ -1,5 +1,6 @@ using UnityEditor; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor.Configuration { @@ -7,6 +8,7 @@ namespace Unity.Netcode.GameObjects.Editor.Configuration /// A of type . /// [FilePath("ProjectSettings/NetcodeForGameObjects.asset", FilePathAttribute.Location.ProjectFolder)] + [MovedFrom(true, "Unity.Netcode.Editor.Configuration", "Unity.Netcode.Editor", null)] public class NetcodeForGameObjectsProjectSettings : ScriptableSingleton { internal static readonly string DefaultNetworkPrefabsPath = "Assets/DefaultNetworkPrefabs.asset"; diff --git a/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabProcessor.cs b/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabProcessor.cs index cab11b3be1..ac5fe4e676 100644 --- a/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabProcessor.cs +++ b/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabProcessor.cs @@ -1,12 +1,14 @@ using System.Collections.Generic; using UnityEditor; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor.Configuration { /// /// Updates the default instance when prefabs are updated (created, moved, deleted) in the project. /// + [MovedFrom(true, "Unity.Netcode.Editor.Configuration", "Unity.Netcode.Editor", null)] public class NetworkPrefabProcessor : AssetPostprocessor { /// diff --git a/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabsEditor.cs b/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabsEditor.cs index 6b1128c829..086ba9af3f 100644 --- a/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabsEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabsEditor.cs @@ -1,6 +1,7 @@ using UnityEditor; using UnityEditorInternal; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { @@ -9,6 +10,7 @@ namespace Unity.Netcode.GameObjects.Editor /// [CustomEditor(typeof(NetworkPrefabsList), true)] [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkPrefabsEditor : UnityEditor.Editor { private ReorderableList m_NetworkPrefabsList; diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index 98193cc631..651449e8c5 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -4,12 +4,14 @@ using Unity.Netcode.Transports.UTP; using UnityEditor; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { /// /// Internal use. Hides the script field for the given component. /// + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class HiddenScriptEditor : UnityEditor.Editor { private static readonly string[] k_HiddenFields = { "m_Script" }; @@ -31,6 +33,7 @@ public override void OnInspectorGUI() /// Internal use. Hides the script field for UnityTransport. /// [CustomEditor(typeof(UnityTransport), true)] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class UnityTransportEditor : HiddenScriptEditor { private static readonly string[] k_HiddenFields = { "m_Script", "ConnectionData" }; @@ -148,6 +151,7 @@ public override void OnInspectorGUI() /// Internal use. Hides the script field for NetworkAnimator. /// [CustomEditor(typeof(NetworkAnimator), true)] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkAnimatorEditor : HiddenScriptEditor { @@ -159,6 +163,7 @@ public class NetworkAnimatorEditor : HiddenScriptEditor /// Internal use. Hides the script field for NetworkRigidbody. /// [CustomEditor(typeof(NetworkRigidbody), true)] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkRigidbodyEditor : HiddenScriptEditor { @@ -170,6 +175,7 @@ public class NetworkRigidbodyEditor : HiddenScriptEditor /// Internal use. Hides the script field for NetworkRigidbody2D. /// [CustomEditor(typeof(NetworkRigidbody2D), true)] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkRigidbody2DEditor : HiddenScriptEditor { diff --git a/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs b/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs index 8f66c3aa4f..4314aa243d 100644 --- a/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs +++ b/com.unity.netcode.gameobjects/Editor/InScenePlacedProcessor.cs @@ -5,7 +5,7 @@ using UnityEngine; using UnityEngine.SceneManagement; -namespace Unity.Netcode.Editor +namespace Unity.Netcode.GameObjects.Editor { /// /// A that sets the /// The base derived component type [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public partial class NetcodeEditorBase : UnityEditor.Editor where TT : MonoBehaviour { private const int k_IndentOffset = 15; diff --git a/com.unity.netcode.gameobjects/Editor/NetworkBehaviourEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkBehaviourEditor.cs index 3d85194ac8..88edb344b6 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkBehaviourEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkBehaviourEditor.cs @@ -4,6 +4,7 @@ using Unity.Netcode.GameObjects.Editor.Configuration; using UnityEditor; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { @@ -12,6 +13,7 @@ namespace Unity.Netcode.GameObjects.Editor /// [CustomEditor(typeof(NetworkBehaviour), true)] [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkBehaviourEditor : UnityEditor.Editor { private bool m_Initialized; diff --git a/com.unity.netcode.gameobjects/Editor/NetworkManagerEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkManagerEditor.cs index a140415e87..234a34c7b4 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkManagerEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkManagerEditor.cs @@ -9,6 +9,7 @@ #if UNITY_6000_5_OR_NEWER using UnityEngine.Assemblies; #endif +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { @@ -18,6 +19,7 @@ namespace Unity.Netcode.GameObjects.Editor /// [CustomEditor(typeof(NetworkManager), true)] [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkManagerEditor : NetcodeEditorBase { private static GUIStyle s_CenteredWordWrappedLabelStyle; diff --git a/com.unity.netcode.gameobjects/Editor/NetworkManagerHelper.cs b/com.unity.netcode.gameobjects/Editor/NetworkManagerHelper.cs index 715d15584d..dcda6150da 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkManagerHelper.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkManagerHelper.cs @@ -5,6 +5,7 @@ using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { @@ -12,6 +13,7 @@ namespace Unity.Netcode.GameObjects.Editor /// /// Specialized editor specific NetworkManager code /// + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkManagerHelper : NetworkManager.INetworkManagerHelper { internal static NetworkManagerHelper Singleton; diff --git a/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs index d1e3ab5b40..1b53e095d5 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs @@ -8,6 +8,7 @@ #endif using UnityEditor; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { @@ -16,6 +17,7 @@ namespace Unity.Netcode.GameObjects.Editor /// [CustomEditor(typeof(NetworkObject), true)] [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkObjectEditor : UnityEditor.Editor { private const NetworkObject.OwnershipStatus k_AllOwnershipFlags = NetworkObject.OwnershipStatus.RequestRequired | NetworkObject.OwnershipStatus.Transferable | NetworkObject.OwnershipStatus.Distributable; @@ -224,6 +226,7 @@ private void OnDestroy() // enum flags is resolved #if BYPASS_DEFAULT_ENUM_DRAWER && MULTIPLAYER_SERVICES_SDK_INSTALLED [CustomPropertyDrawer(typeof(NetworkObject.OwnershipStatus))] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkObjectOwnership : PropertyDrawer { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) diff --git a/com.unity.netcode.gameobjects/Editor/NetworkRigidbodyBaseEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkRigidbodyBaseEditor.cs index 46bb7c4f6d..f96a394056 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkRigidbodyBaseEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkRigidbodyBaseEditor.cs @@ -1,11 +1,13 @@ #if COM_UNITY_MODULES_PHYSICS || COM_UNITY_MODULES_PHYSICS2D using Unity.Netcode.Components; using UnityEditor; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { [CustomEditor(typeof(NetworkRigidbodyBase), true)] [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkRigidbodyBaseEditor : NetcodeEditorBase { private SerializedProperty m_UseRigidBodyForMotion; diff --git a/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs index 1fcb77f709..3b61dadff2 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs @@ -2,6 +2,7 @@ using Unity.Netcode.Components; using UnityEditor; using UnityEngine; +using UnityEngine.Scripting.APIUpdating; namespace Unity.Netcode.GameObjects.Editor { @@ -10,6 +11,7 @@ namespace Unity.Netcode.GameObjects.Editor /// [CustomEditor(typeof(NetworkTransform), true)] [CanEditMultipleObjects] + [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] public class NetworkTransformEditor : NetcodeEditorBase { private SerializedProperty m_SwitchTransformSpaceWhenParented; From dcf9a26ef635fd4fbc3ec87b7a3ec4ba8ff2ccd6 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 24 Aug 2026 15:22:25 -0500 Subject: [PATCH 02/12] test 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. --- .yamato/_run-all.yml | 14 + .yamato/_triggers.yml | 16 + .yamato/api-updater-test.yml | 65 ++ apiupdaterproject/.gitignore | 78 ++ .../Assets/DefaultNetworkPrefabs.asset | 16 + .../Assets/DefaultNetworkPrefabs.asset.meta | 8 + apiupdaterproject/Assets/Editor.meta | 8 + .../Assets/Editor/DeprecatedApiUsage.cs | 33 + .../Assets/Editor/DeprecatedApiUsage.cs.meta | 11 + .../Editor/DeprecatedApiUsageQualified.cs | 25 + .../DeprecatedApiUsageQualified.cs.meta | 11 + .../Assets/UpgradeProbeBehaviour.cs | 20 + .../Assets/UpgradeProbeBehaviour.cs.meta | 11 + apiupdaterproject/Packages/manifest.json | 10 + .../ProjectSettings/AudioManager.asset | 19 + .../ProjectSettings/ClusterInputManager.asset | 6 + .../ProjectSettings/DynamicsManager.asset | 34 + .../ProjectSettings/EditorBuildSettings.asset | 8 + .../ProjectSettings/EditorSettings.asset | 30 + .../ProjectSettings/GraphicsSettings.asset | 63 ++ .../ProjectSettings/InputManager.asset | 295 +++++++ .../ProjectSettings/MemorySettings.asset | 35 + .../ProjectSettings/MultiplayerManager.asset | 7 + .../ProjectSettings/NavMeshAreas.asset | 91 ++ .../ProjectSettings/PackageManager.policy | 1 + .../PackageManagerSettings.asset | 44 + .../ProjectSettings/Physics2DSettings.asset | 56 ++ .../PhysicsCoreProjectSettings2D.asset | 6 + .../ProjectSettings/PresetManager.asset | 7 + .../ProjectAuditorSettings.asset | 36 + .../ProjectSettings/ProjectSettings.asset | 786 ++++++++++++++++++ .../ProjectSettings/ProjectVersion.txt | 2 + .../ProjectSettings/QualitySettings.asset | 232 ++++++ .../ProjectSettings/TagManager.asset | 43 + .../ProjectSettings/TimeManager.asset | 9 + .../UnityConnectSettings.asset | 35 + .../ProjectSettings/VFXManager.asset | 12 + .../VersionControlSettings.asset | 8 + .../ProjectSettings/XRSettings.asset | 10 + apiupdaterproject/README.md | 121 +++ apiupdaterproject/run-upgrade-test.ps1 | 169 ++++ 41 files changed, 2491 insertions(+) create mode 100644 .yamato/api-updater-test.yml create mode 100644 apiupdaterproject/.gitignore create mode 100644 apiupdaterproject/Assets/DefaultNetworkPrefabs.asset create mode 100644 apiupdaterproject/Assets/DefaultNetworkPrefabs.asset.meta create mode 100644 apiupdaterproject/Assets/Editor.meta create mode 100644 apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs create mode 100644 apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs.meta create mode 100644 apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs create mode 100644 apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs.meta create mode 100644 apiupdaterproject/Assets/UpgradeProbeBehaviour.cs create mode 100644 apiupdaterproject/Assets/UpgradeProbeBehaviour.cs.meta create mode 100644 apiupdaterproject/Packages/manifest.json create mode 100644 apiupdaterproject/ProjectSettings/AudioManager.asset create mode 100644 apiupdaterproject/ProjectSettings/ClusterInputManager.asset create mode 100644 apiupdaterproject/ProjectSettings/DynamicsManager.asset create mode 100644 apiupdaterproject/ProjectSettings/EditorBuildSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/EditorSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/GraphicsSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/InputManager.asset create mode 100644 apiupdaterproject/ProjectSettings/MemorySettings.asset create mode 100644 apiupdaterproject/ProjectSettings/MultiplayerManager.asset create mode 100644 apiupdaterproject/ProjectSettings/NavMeshAreas.asset create mode 100644 apiupdaterproject/ProjectSettings/PackageManager.policy create mode 100644 apiupdaterproject/ProjectSettings/PackageManagerSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/Physics2DSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/PhysicsCoreProjectSettings2D.asset create mode 100644 apiupdaterproject/ProjectSettings/PresetManager.asset create mode 100644 apiupdaterproject/ProjectSettings/ProjectAuditorSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/ProjectSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/ProjectVersion.txt create mode 100644 apiupdaterproject/ProjectSettings/QualitySettings.asset create mode 100644 apiupdaterproject/ProjectSettings/TagManager.asset create mode 100644 apiupdaterproject/ProjectSettings/TimeManager.asset create mode 100644 apiupdaterproject/ProjectSettings/UnityConnectSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/VFXManager.asset create mode 100644 apiupdaterproject/ProjectSettings/VersionControlSettings.asset create mode 100644 apiupdaterproject/ProjectSettings/XRSettings.asset create mode 100644 apiupdaterproject/README.md create mode 100644 apiupdaterproject/run-upgrade-test.ps1 diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index d0af1a4d4f..6236212b05 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -444,3 +444,17 @@ run_all_project_tests_cmb_service_default: {% endfor -%} {% endfor -%} {% endfor -%} + + +# Runs the NGO 2.x -> 3.x editor script upgrade validation (see api-updater-test.yml) +# Manual only today. Add this to develop_nightly or develop_weekly_trunk in _triggers.yml to schedule it. +run_all_api_updater_tests: + name: Run All API Updater Tests + dependencies: +{% for platform in test_platforms.desktop -%} +{% if platform.name == "win" -%} +{% for editor in validation_editors.default -%} + - .yamato/api-updater-test.yml#api_updater_test_{{ platform.name }}_{{ editor }} +{% endfor -%} +{% endif -%} +{% endfor -%} diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index c845bff1f0..be99b77d34 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -134,6 +134,22 @@ unified_pr_checks: cancel_old_ci: true +# NGO 2.x -> 3.x editor script upgrade validation, on demand. +# This job allows the API updater test to be kicked off by commenting "/ci apiupdater". +# It is deliberately not part of the PR gate: what it protects only changes when a public editor type +# is added, moved or removed, so paying a full editor import on every PR is not worth it. +# To put it on a schedule, add .yamato/_run-all.yml#run_all_api_updater_tests to develop_nightly or +# develop_weekly_trunk below. +api_updater_pr_checks: + name: API Updater checks [on demand] + dependencies: + - .yamato/_run-all.yml#run_all_api_updater_tests + triggers: + expression: |- + pull_request.comment eq "apiupdater" + cancel_old_ci: true + + # Run all tests on nightly basis. # Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds # Those tests are all running on trunk and the default editor (since it's daily and running all of them would add a lot of overhead) diff --git a/.yamato/api-updater-test.yml b/.yamato/api-updater-test.yml new file mode 100644 index 0000000000..e6c5361b67 --- /dev/null +++ b/.yamato/api-updater-test.yml @@ -0,0 +1,65 @@ +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. +--- + +# DESCRIPTION-------------------------------------------------------------------------- + # This job validates the NGO 2.x -> 3.x upgrade path for editor scripts. + # NGO 3.0 renamed the editor assembly and its namespaces (Unity.Netcode.Editor -> + # Unity.Netcode.GameObjects.Editor), and every relocated public type carries a [MovedFrom] so that + # Unity's API updater rewrites a 2.x project's editor scripts automatically on upgrade. + # apiupdaterproject holds editor code written against the 2.x API; the job imports it with + # -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived. + # See apiupdaterproject/README.md. + +# WHY THIS JOB IS MANUAL ONLY----------------------------------------------------------- + # It is deliberately not wired into pr_minimal_required_checks or pr_code_changes_checks. The thing + # it protects only changes when a public editor type is added, moved or removed, so paying a full + # editor import on every PR is not worth it. Kick it off with "/ci apiupdater" in a PR comment + # (see api_updater_pr_checks in _triggers.yml), or from the Yamato UI. + # If it should also run on a schedule, add .yamato/_run-all.yml#run_all_api_updater_tests to + # develop_nightly or develop_weekly_trunk in _triggers.yml. + +# CONFIGURATION STRUCTURE-------------------------------------------------------------- + # Windows only, and not looped over test_platforms: run-upgrade-test.ps1 is PowerShell and uses + # robocopy to purge Library (paths there exceed MAX_PATH, which Remove-Item cannot delete). + # A single editor is enough - the job is asserting on the editor's API updater, not on NGO + # behaviour across editor versions. Widen to validation_editors.all if that stops being true. + +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- + # apiupdaterproject/Packages/manifest.json references the package by relative path + # (file:../../com.unity.netcode.gameobjects), so the job tests the package as it sits in the repo + # and needs no package-pack dependency. + # The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the + # job is safe to re-run on the same agent. + # -Clean purges Library first: the assertion is meaningless against a warm Library that already + # holds rewritten sources from a previous run. + +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- + # The expected type list in run-upgrade-test.ps1 is inline and hand-written. That is fine because + # its input is frozen: it enumerates the 2.x public editor API, and develop-2.0.0 is released. + # TODO: the list does not extend itself. A later relocation within 3.x, or a back port into 2.x, + # has to be added by hand or this job silently stops covering it. Deriving the list from the + # [MovedFrom] attributes in the package source would close that. + +#------------------------------------------------------------------------------------ + +{% for platform in test_platforms.desktop -%} +{% if platform.name == "win" -%} +{% for editor in validation_editors.default -%} +api_updater_test_{{ platform.name }}_{{ editor }}: + name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}] + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor }} + commands: + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import + - powershell -NoProfile -ExecutionPolicy Bypass -File apiupdaterproject/run-upgrade-test.ps1 -UnityExe .Editor/Editor/Unity.exe -Clean + artifacts: + logs: + paths: + - "apiupdaterproject/upgrade-test.log" + dependencies: + - .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors +{% endfor -%} +{% endif -%} +{% endfor -%} diff --git a/apiupdaterproject/.gitignore b/apiupdaterproject/.gitignore new file mode 100644 index 0000000000..e9dc315b1f --- /dev/null +++ b/apiupdaterproject/.gitignore @@ -0,0 +1,78 @@ +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Uu]ser[Ss]ettings/ + +# MemoryCaptures can get excessive in size. +# They also could contain extremely sensitive data +/[Mm]emoryCaptures/ + +# Asset meta data should only be ignored when the corresponding asset is also ignored +!/[Aa]ssets/**/*.meta + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# Autogenerated Jetbrains Rider plugin +/[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.aab +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties + +# Packed Addressables +/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* + +# Temporary auto-generated Android Assets +/[Aa]ssets/[Ss]treamingAssets/aa.meta +/[Aa]ssets/[Ss]treamingAssets/aa/* +/[Aa]ssets/[Ss]treamingAssets/BuildInfo.json +/[Aa]ssets/[Ss]treamingAssets/BuildInfo.json.meta + +InitTestScene* + +# API updater test run log +upgrade-test.log diff --git a/apiupdaterproject/Assets/DefaultNetworkPrefabs.asset b/apiupdaterproject/Assets/DefaultNetworkPrefabs.asset new file mode 100644 index 0000000000..219664e857 --- /dev/null +++ b/apiupdaterproject/Assets/DefaultNetworkPrefabs.asset @@ -0,0 +1,16 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e651dbb3fbac04af2b8f5abf007ddc23, type: 3} + m_Name: DefaultNetworkPrefabs + m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkPrefabsList + IsDefault: 1 + List: [] diff --git a/apiupdaterproject/Assets/DefaultNetworkPrefabs.asset.meta b/apiupdaterproject/Assets/DefaultNetworkPrefabs.asset.meta new file mode 100644 index 0000000000..5c7c400664 --- /dev/null +++ b/apiupdaterproject/Assets/DefaultNetworkPrefabs.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 755b0d5ff40326f4b825c16225341222 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/apiupdaterproject/Assets/Editor.meta b/apiupdaterproject/Assets/Editor.meta new file mode 100644 index 0000000000..dc2815c18d --- /dev/null +++ b/apiupdaterproject/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a2906969a5ae4881b0a251dc425ca155 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs b/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs new file mode 100644 index 0000000000..bb02a4e7f3 --- /dev/null +++ b/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs @@ -0,0 +1,33 @@ +// NGO 2.x-era editor code. Every type reference below must be rewritten by Unity's API updater to +// its `Unity.Netcode.GameObjects.Editor` equivalent. Do not "fix" this file - it is the input to +// the upgrade test. See ../../README.md. +#pragma warning disable 169 // field is never used + +using ApiUpdaterProject; +using Unity.Netcode.Editor; +using Unity.Netcode.Editor.Configuration; + +namespace ApiUpdaterProject.Editor +{ + internal class DeprecatedApiUsage + { + // Unity.Netcode.Editor -> Unity.Netcode.GameObjects.Editor + private NetworkPrefabsEditor m_NetworkPrefabsEditor; + private HiddenScriptEditor m_HiddenScriptEditor; + private UnityTransportEditor m_UnityTransportEditor; + private NetworkAnimatorEditor m_NetworkAnimatorEditor; + private NetworkRigidbodyEditor m_NetworkRigidbodyEditor; + private NetworkRigidbody2DEditor m_NetworkRigidbody2DEditor; + private NetcodeEditorBase m_NetcodeEditorBase; + private NetworkBehaviourEditor m_NetworkBehaviourEditor; + private NetworkManagerEditor m_NetworkManagerEditor; + private NetworkManagerHelper m_NetworkManagerHelper; + private NetworkObjectEditor m_NetworkObjectEditor; + private NetworkRigidbodyBaseEditor m_NetworkRigidbodyBaseEditor; + private NetworkTransformEditor m_NetworkTransformEditor; + + // Unity.Netcode.Editor.Configuration -> Unity.Netcode.GameObjects.Editor.Configuration + private NetcodeForGameObjectsProjectSettings m_ProjectSettings; + private NetworkPrefabProcessor m_NetworkPrefabProcessor; + } +} diff --git a/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs.meta b/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs.meta new file mode 100644 index 0000000000..02f1e3e326 --- /dev/null +++ b/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae78c491124744ab941342cb890bf386 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs b/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs new file mode 100644 index 0000000000..79fa1b41bd --- /dev/null +++ b/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs @@ -0,0 +1,25 @@ +// The same 2.x API reached through the reference forms the updater has to handle separately from a +// plain `using` + simple name: fully qualified names, a namespace alias, a type alias, a base type +// and a typeof. Do not "fix" this file - it is the input to the upgrade test. +#pragma warning disable 169 // field is never used + +using System; +using Cfg = Unity.Netcode.Editor.Configuration; +using ManagerEditor = Unity.Netcode.Editor.NetworkManagerEditor; + +namespace ApiUpdaterProject.Editor +{ + internal class DeprecatedApiUsageQualified + { + private Unity.Netcode.Editor.NetworkObjectEditor m_FullyQualified; + private Unity.Netcode.Editor.NetcodeEditorBase m_FullyQualifiedGeneric; + private Cfg.NetworkPrefabProcessor m_ThroughNamespaceAlias; + private ManagerEditor m_ThroughTypeAlias; + + private Type TransformEditorType => typeof(Unity.Netcode.Editor.NetworkTransformEditor); + } + + internal class DerivesFromDeprecatedBase : Unity.Netcode.Editor.HiddenScriptEditor + { + } +} diff --git a/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs.meta b/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs.meta new file mode 100644 index 0000000000..b5a5867a77 --- /dev/null +++ b/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 94e3b88796ed4665b73baf0ca0232bbd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/apiupdaterproject/Assets/UpgradeProbeBehaviour.cs b/apiupdaterproject/Assets/UpgradeProbeBehaviour.cs new file mode 100644 index 0000000000..86d9b764d5 --- /dev/null +++ b/apiupdaterproject/Assets/UpgradeProbeBehaviour.cs @@ -0,0 +1,20 @@ +using UnityEngine; + +namespace ApiUpdaterProject +{ + /// + /// Type argument for the NetcodeEditorBase<TT> references in Assets/Editor. + /// + /// + /// Deliberately a local MonoBehaviour rather than NGO's NetworkManager. com.unity.transport 6.6.0 + /// (the builtin on some 6000.6 editors) ships a `Unity.Netcode.NetworkManager` of its own in + /// Unity.Networking.Transport.NetcodeInterop, so any NetworkManager reference from an + /// auto-referencing assembly like Assembly-CSharp-Editor is CS0433-ambiguous. The type argument is + /// incidental to what the upgrade test measures - only the generic type reference itself has to be + /// rewritten - so this keeps the test independent of the resolved transport version. + /// + // public, not internal: the references to it live in Assembly-CSharp-Editor, a different assembly. + public class UpgradeProbeBehaviour : MonoBehaviour + { + } +} diff --git a/apiupdaterproject/Assets/UpgradeProbeBehaviour.cs.meta b/apiupdaterproject/Assets/UpgradeProbeBehaviour.cs.meta new file mode 100644 index 0000000000..feded1d42e --- /dev/null +++ b/apiupdaterproject/Assets/UpgradeProbeBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 97dd996fd96845729417fbf468d3429e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/apiupdaterproject/Packages/manifest.json b/apiupdaterproject/Packages/manifest.json new file mode 100644 index 0000000000..b50ba6c341 --- /dev/null +++ b/apiupdaterproject/Packages/manifest.json @@ -0,0 +1,10 @@ +{ + "disableProjectUpdate": false, + "dependencies": { + "com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.smartstrings": "1.0.0" + } +} diff --git a/apiupdaterproject/ProjectSettings/AudioManager.asset b/apiupdaterproject/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000000..07ebfb05df --- /dev/null +++ b/apiupdaterproject/ProjectSettings/AudioManager.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 + m_RequestedDSPBufferSize: 1024 diff --git a/apiupdaterproject/ProjectSettings/ClusterInputManager.asset b/apiupdaterproject/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000000..e7886b266a --- /dev/null +++ b/apiupdaterproject/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/apiupdaterproject/ProjectSettings/DynamicsManager.asset b/apiupdaterproject/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000000..cdc1f3eab5 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/DynamicsManager.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0 + m_ClothInterCollisionStiffness: 0 + m_ContactsGeneration: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_AutoSimulation: 1 + m_AutoSyncTransforms: 0 + m_ReuseCollisionCallbacks: 1 + m_ClothInterCollisionSettingsToggle: 0 + m_ContactPairsMode: 0 + m_BroadphaseType: 0 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 250, y: 250, z: 250} + m_WorldSubdivisions: 8 + m_FrictionType: 0 + m_EnableEnhancedDeterminism: 0 + m_EnableUnifiedHeightmaps: 1 + m_DefaultMaxAngluarSpeed: 7 diff --git a/apiupdaterproject/ProjectSettings/EditorBuildSettings.asset b/apiupdaterproject/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000000..0147887ef4 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/EditorBuildSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1045 &1 +EditorBuildSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Scenes: [] + m_configObjects: {} diff --git a/apiupdaterproject/ProjectSettings/EditorSettings.asset b/apiupdaterproject/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000000..de5d0b2dff --- /dev/null +++ b/apiupdaterproject/ProjectSettings/EditorSettings.asset @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_ExternalVersionControlSupport: Visible Meta Files + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 0 + m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} + m_SpritePackerMode: 0 + m_SpritePackerPaddingPower: 1 + m_EtcTextureCompressorBehavior: 1 + m_EtcTextureFastCompressor: 1 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 4 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref + m_ProjectGenerationRootNamespace: + m_CollabEditorSettings: + inProgressEnabled: 1 + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_ShowLightmapResolutionOverlay: 1 + m_UseLegacyProbeSampleCount: 0 + m_SerializeInlineMappingsOnOneLine: 1 \ No newline at end of file diff --git a/apiupdaterproject/ProjectSettings/GraphicsSettings.asset b/apiupdaterproject/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000000..43369e3c51 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/GraphicsSettings.asset @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!30 &1 +GraphicsSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_Deferred: + m_Mode: 1 + m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} + m_DeferredReflections: + m_Mode: 1 + m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} + m_LegacyDeferred: + m_Mode: 1 + m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_AlwaysIncludedShaders: + - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + m_PreloadedShaders: [] + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, + type: 0} + m_CustomRenderPipeline: {fileID: 0} + m_TransparencySortMode: 0 + m_TransparencySortAxis: {x: 0, y: 0, z: 1} + m_DefaultRenderingPath: 1 + m_DefaultMobileRenderingPath: 1 + m_TierSettings: [] + m_LightmapStripping: 0 + m_FogStripping: 0 + m_InstancingStripping: 0 + m_LightmapKeepPlain: 1 + m_LightmapKeepDirCombined: 1 + m_LightmapKeepDynamicPlain: 1 + m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepShadowMask: 1 + m_LightmapKeepSubtractive: 1 + m_FogKeepLinear: 1 + m_FogKeepExp: 1 + m_FogKeepExp2: 1 + m_AlbedoSwatchInfos: [] + m_LightsUseLinearIntensity: 0 + m_LightsUseColorTemperature: 0 + m_LogWhenShaderIsCompiled: 0 + m_AllowEnlightenSupportForUpgradedProject: 0 diff --git a/apiupdaterproject/ProjectSettings/InputManager.asset b/apiupdaterproject/ProjectSettings/InputManager.asset new file mode 100644 index 0000000000..17c8f538e2 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/InputManager.asset @@ -0,0 +1,295 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/apiupdaterproject/ProjectSettings/MemorySettings.asset b/apiupdaterproject/ProjectSettings/MemorySettings.asset new file mode 100644 index 0000000000..5b5facecac --- /dev/null +++ b/apiupdaterproject/ProjectSettings/MemorySettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!387306366 &1 +MemorySettings: + m_ObjectHideFlags: 0 + m_EditorMemorySettings: + m_MainAllocatorBlockSize: -1 + m_ThreadAllocatorBlockSize: -1 + m_MainGfxBlockSize: -1 + m_ThreadGfxBlockSize: -1 + m_CacheBlockSize: -1 + m_TypetreeBlockSize: -1 + m_ProfilerBlockSize: -1 + m_ProfilerEditorBlockSize: -1 + m_BucketAllocatorGranularity: -1 + m_BucketAllocatorBucketsCount: -1 + m_BucketAllocatorBlockSize: -1 + m_BucketAllocatorBlockCount: -1 + m_ProfilerBucketAllocatorGranularity: -1 + m_ProfilerBucketAllocatorBucketsCount: -1 + m_ProfilerBucketAllocatorBlockSize: -1 + m_ProfilerBucketAllocatorBlockCount: -1 + m_TempAllocatorSizeMain: -1 + m_JobTempAllocatorBlockSize: -1 + m_BackgroundJobTempAllocatorBlockSize: -1 + m_JobTempAllocatorReducedBlockSize: -1 + m_TempAllocatorSizeGIBakingWorker: -1 + m_TempAllocatorSizeNavMeshWorker: -1 + m_TempAllocatorSizeAudioWorker: -1 + m_TempAllocatorSizeCloudWorker: -1 + m_TempAllocatorSizeGfx: -1 + m_TempAllocatorSizeJobWorker: -1 + m_TempAllocatorSizeBackgroundWorker: -1 + m_TempAllocatorSizePreloadManager: -1 + m_PlatformMemorySettings: {} diff --git a/apiupdaterproject/ProjectSettings/MultiplayerManager.asset b/apiupdaterproject/ProjectSettings/MultiplayerManager.asset new file mode 100644 index 0000000000..2a936644e0 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/MultiplayerManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!655991488 &1 +MultiplayerManager: + m_ObjectHideFlags: 0 + m_EnableMultiplayerRoles: 0 + m_StrippingTypes: {} diff --git a/apiupdaterproject/ProjectSettings/NavMeshAreas.asset b/apiupdaterproject/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000000..3b0b7c3d18 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/NavMeshAreas.asset @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_SettingNames: + - Humanoid diff --git a/apiupdaterproject/ProjectSettings/PackageManager.policy b/apiupdaterproject/ProjectSettings/PackageManager.policy new file mode 100644 index 0000000000..76a48d7dcf --- /dev/null +++ b/apiupdaterproject/ProjectSettings/PackageManager.policy @@ -0,0 +1 @@ +R1JEXQNfDxhSVGNcRhJfDlYORFBpXG42VgkLVhh6VEJRWwwUUjlXWlJSAAkNUFQFAQcFBVcHAgAPUgEDWVIEAgEHVwNaBw== \ No newline at end of file diff --git a/apiupdaterproject/ProjectSettings/PackageManagerSettings.asset b/apiupdaterproject/ProjectSettings/PackageManagerSettings.asset new file mode 100644 index 0000000000..71b4685896 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/PackageManagerSettings.asset @@ -0,0 +1,44 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_EnablePreReleasePackages: 0 + m_AdvancedSettingsExpanded: 1 + m_ScopedRegistriesSettingsExpanded: 1 + m_SeeAllPackageVersions: 0 + m_DismissPreviewPackagesInUse: 0 + oneTimeWarningShown: 0 + oneTimePackageErrorsPopUpShown: 0 + m_MainRegistry: + m_Id: main + m_Name: + m_Url: https://packages.unity.com + m_Scopes: [] + m_IsDefault: 1 + m_IsUnityRegistry: 1 + m_Capabilities: 7 + m_ConfigSource: 0 + m_Compliance: + m_Status: 0 + m_Violations: [] + m_ScopedRegistries: [] + m_UserSelectedRegistryName: + m_UserAddingNewScopedRegistry: 0 + m_RegistryInfoDraft: + m_Modified: 0 + m_ErrorMessage: + m_UserModificationsEntityId: + m_rawData: 1099511629076 + m_OriginalEntityId: + m_rawData: 1099511629077 + m_LoadAssets: 0 diff --git a/apiupdaterproject/ProjectSettings/Physics2DSettings.asset b/apiupdaterproject/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000000..47880b1c8c --- /dev/null +++ b/apiupdaterproject/ProjectSettings/Physics2DSettings.asset @@ -0,0 +1,56 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_VelocityThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_JobOptions: + serializedVersion: 2 + useMultithreading: 0 + useConsistencySorting: 0 + m_InterpolationPosesPerJob: 100 + m_NewContactsPerJob: 30 + m_CollideContactsPerJob: 100 + m_ClearFlagsPerJob: 200 + m_ClearBodyForcesPerJob: 200 + m_SyncDiscreteFixturesPerJob: 50 + m_SyncContinuousFixturesPerJob: 50 + m_FindNearestContactsPerJob: 100 + m_UpdateTriggerContactsPerJob: 100 + m_IslandSolverCostThreshold: 100 + m_IslandSolverBodyCostScale: 1 + m_IslandSolverContactCostScale: 10 + m_IslandSolverJointCostScale: 10 + m_IslandSolverBodiesPerJob: 50 + m_IslandSolverContactsPerJob: 50 + m_AutoSimulation: 1 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_CallbacksOnDisable: 1 + m_ReuseCollisionCallbacks: 1 + m_AutoSyncTransforms: 0 + m_AlwaysShowColliders: 0 + m_ShowColliderSleep: 1 + m_ShowColliderContacts: 0 + m_ShowColliderAABB: 0 + m_ContactArrowScale: 0.2 + m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} + m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} + m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} + m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/apiupdaterproject/ProjectSettings/PhysicsCoreProjectSettings2D.asset b/apiupdaterproject/ProjectSettings/PhysicsCoreProjectSettings2D.asset new file mode 100644 index 0000000000..049c7454b5 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/PhysicsCoreProjectSettings2D.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!176606843 &1 +PhysicsCoreProjectSettings2D: + m_ObjectHideFlags: 0 + m_PhysicsCoreSettings: {fileID: 0} diff --git a/apiupdaterproject/ProjectSettings/PresetManager.asset b/apiupdaterproject/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000000..67a94daefe --- /dev/null +++ b/apiupdaterproject/ProjectSettings/PresetManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_DefaultPresets: {} diff --git a/apiupdaterproject/ProjectSettings/ProjectAuditorSettings.asset b/apiupdaterproject/ProjectSettings/ProjectAuditorSettings.asset new file mode 100644 index 0000000000..dfb37d71e2 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/ProjectAuditorSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 0} + m_Name: + m_EditorClassIdentifier: UnityEditor.ProjectAuditorModule:Unity.ProjectAuditor.Editor:ProjectAuditorSettings + Rules: + rules: [] + DiagnosticParams: + paramsStack: + - PlatformGroup: + m_String: Unknown + m_SerializedParams: + - Key: TextureStreamingMipmapsSizeLimit + Value: 4000 + - Key: SpriteAtlasEmptySpaceLimit + Value: 50 + - Key: StreamingAssetsFolderSizeLimit + Value: 50 + - Key: StreamingClipThresholdBytes + Value: 218294 + - Key: LongDecompressedClipThresholdBytes + Value: 204800 + - Key: LongCompressedMobileClipThresholdBytes + Value: 204800 + - Key: LoadInBackGroundClipSizeThresholdBytes + Value: 204800 + CurrentParamsIndex: 0 diff --git a/apiupdaterproject/ProjectSettings/ProjectSettings.asset b/apiupdaterproject/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000000..4b22a835c4 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/ProjectSettings.asset @@ -0,0 +1,786 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 30 + productGUID: 53f9fd541540241529c78965266c29d6 + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: DefaultCompany + productName: minimalproject + defaultCursor: {fileID: 0} + cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} + m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + defaultScreenWidth: 1024 + defaultScreenHeight: 768 + defaultScreenWidthWeb: 960 + defaultScreenHeightWeb: 600 + m_StereoRenderingPath: 0 + m_ActiveColorSpace: 0 + unsupportedMSAAFallback: 0 + m_SpriteBatchMaxVertexCount: 65535 + m_SpriteBatchVertexThreshold: 300 + m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 + numberOfMipsStrippedPerMipmapLimitGroup: {} + m_StackTraceTypes: 010000000100000001000000010000000100000001000000i + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + iosUseCustomAppBackgroundBehavior: 0 + allowedAutorotateToPortrait: 1 + allowedAutorotateToPortraitUpsideDown: 1 + allowedAutorotateToLandscapeRight: 1 + allowedAutorotateToLandscapeLeft: 1 + useOSAutorotation: 1 + use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 + adjustIOSFPSUsingThermalState: 1 + thermalStateSeriousIOSFPS: 30 + thermalStateCriticalIOSFPS: 15 + disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 1 + androidUseSwappy: 1 + androidRequestedVisibleInsets: 0 + androidSystemBarsBehavior: 2 + androidDisplayOptions: 1 + androidBlitType: 0 + androidResizeableActivity: 1 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 + androidAutoRotationBehavior: 1 + androidPredictiveBackSupport: 1 + androidApplicationEntry: 1 + defaultIsNativeResolution: 1 + macRetinaSupport: 1 + runInBackground: 1 + callOnDisableOnAssetBundleUnload: 1 + muteOtherAudioSources: 0 + Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + audioSpatialExperience: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 + submitAnalytics: 1 + usePlayerLog: 1 + dedicatedServerOptimizations: 1 + bakeCollisionMeshes: 0 + forceSingleInstance: 0 + useFlipModelSwapchain: 1 + resizableWindow: 0 + useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games + gpuSkinning: 1 + meshDeformation: 2 + xboxPIXTextureCapture: 0 + xboxEnableAvatar: 0 + xboxEnableKinect: 0 + xboxEnableKinectAutoTracking: 0 + xboxEnableFitness: 0 + visibleInBackground: 1 + allowFullscreenSwitch: 1 + fullscreenMode: 1 + xboxSpeechDB: 0 + xboxEnableHeadOrientation: 0 + xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 + metalUseMetalDisplayLink: 0 + xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOneEnableTypeOptimization: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 0 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 + switchNVNMaxPublicTextureIDCount: 0 + switchNVNMaxPublicSamplerIDCount: 0 + switchMaxWorkerMultiple: 8 + switchNVNGraphicsFirmwareMemory: 32 + switchGraphicsJobsSyncAfterKick: 1 + vulkanNumSwapchainBuffers: 3 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 + loadStoreDebugModeEnabled: 0 + visionOSBundleVersion: 1.0 + tvOSBundleVersion: 1.0 + bundleVersion: 0.1 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + vrSettings: + enable360StereoCapture: 0 + enableFrameTimingStats: 0 + enableOpenGLProfilerGPURecorders: 1 + allowHDRDisplaySupport: 0 + useHDRDisplay: 0 + hdrBitDepth: 0 + m_ColorGamuts: 00000000i + targetPixelDensity: 30 + resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + androidMinAspectRatio: 1 + applicationIdentifier: {} + buildNumber: + Standalone: 0 + VisionOS: 0 + iPhone: 0 + tvOS: 0 + overrideDefaultApplicationIdentifier: 0 + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 26 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + AndroidPreferredDataLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + androidSplitApplicationBinary: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 1 + strictShaderVariantMatching: 0 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSSimulatorArchitecture: 0 + iOSTargetOSVersionString: 15.0 + tvOSSdkVersion: 0 + tvOSSimulatorArchitecture: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 15.0 + VisionOSSdkVersion: 0 + VisionOSTargetOSVersionString: 1.0 + xcodeProjectType: 0 + uIPrerenderedIcon: 0 + uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 + uIStatusBarHidden: 1 + uIExitOnSuspend: 0 + uIStatusBarStyle: 0 + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] + iOSLaunchScreenType: 0 + iOSLaunchScreenPortrait: {fileID: 0} + iOSLaunchScreenLandscape: {fileID: 0} + iOSLaunchScreenBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreenFillPct: 100 + iOSLaunchScreenSize: 100 + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + macOSURLSchemes: [] + iOSBackgroundModes: 0 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + metalCompileShaderBinary: 0 + iOSRenderExtraFrameOnPause: 0 + iosCopyPluginsCodeInsteadOfSymlink: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + VisionOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + VisionOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + shaderPrecisionModel: 0 + clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea + templatePackageId: com.unity.template.3d@5.0.4 + templateDefaultScene: Assets/Scenes/SampleScene.unity + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomGradleSettingsTemplate: 0 + useCustomProguardFile: 0 + AndroidTargetArchitectures: 1 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 + AndroidEnableArm64MTE: 0 + AndroidBuildApkPerCpuArchitecture: 0 + AndroidTVCompatibility: 0 + AndroidIsGame: 1 + androidAppCategory: 3 + useAndroidAppCategory: 1 + androidAppCategoryOther: + AndroidEnableTango: 0 + androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 + m_AndroidBanners: + - width: 320 + height: 180 + banner: {fileID: 0} + androidGamepadSupportLevel: 0 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 + AndroidReportGooglePlayAppDependencies: 1 + androidSymbolsSizeThreshold: 800 + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] + m_BuildTargetBatching: + - m_BuildTarget: Standalone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: tvOS + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: Android + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: iPhone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: WebGL + m_StaticBatching: 0 + m_DynamicBatching: 0 + m_BuildTargetShaderSettings: [] + m_BuildTargetGraphicsJobs: + - m_BuildTarget: MacStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: Switch + m_GraphicsJobs: 1 + - m_BuildTarget: MetroSupport + m_GraphicsJobs: 1 + - m_BuildTarget: AppleTVSupport + m_GraphicsJobs: 0 + - m_BuildTarget: BJMSupport + m_GraphicsJobs: 1 + - m_BuildTarget: LinuxStandaloneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: PS4Player + m_GraphicsJobs: 1 + - m_BuildTarget: iOSSupport + m_GraphicsJobs: 0 + - m_BuildTarget: WindowsStandaloneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobs: 1 + - m_BuildTarget: LuminSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AndroidPlayer + m_GraphicsJobs: 0 + - m_BuildTarget: WebGLSupport + m_GraphicsJobs: 0 + m_BuildTargetGraphicsJobMode: + - m_BuildTarget: PS4Player + m_GraphicsJobMode: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobMode: 0 + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: AndroidPlayer + m_APIs: 150000000b000000i + m_Automatic: 1 + - m_BuildTarget: iOSSupport + m_APIs: 10000000i + m_Automatic: 1 + - m_BuildTarget: AppleTVSupport + m_APIs: 10000000i + m_Automatic: 1 + - m_BuildTarget: WebGLSupport + m_APIs: 0b000000i + m_Automatic: 1 + - m_BuildTarget: WindowsStandaloneSupport + m_APIs: 0200000012000000i + m_Automatic: 0 + m_DefaultShaderChunkSizeInMB: 16 + m_DefaultShaderChunkCount: 0 + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + openGLRequireES32: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupHDRCubemapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] + m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + editorGfxJobOverride: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + bluetoothUsageDescription: + macOSTargetOSVersion: 12.0 + switchNMETAOverride: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchEnableFileSystemTrace: 0 + switchLTOSetting: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchCompilerFlags: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchTitleNames_15: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchPublisherNames_15: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchIcons_15: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchSmallIcons_15: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 22 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 0 + switchSupportedNpadCount: 8 + switchEnableTouchScreen: 1 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchDisableHTCSPlayerConnection: 0 + switchUseNewStyleFilepaths: 0 + switchUseLegacyFmodPriorities: 0 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 + switchUpgradedPlayerSettingsToNMETA: 0 + switchCaStoreSource: 0 + switchCaStoreFilePath: + ps4NPAgeRating: 12 + ps4NPTitleSecret: + ps4NPTrophyPackPath: + ps4ParentalLevel: 11 + ps4ContentID: ED1633-NPXX51362_00-0000000000000000 + ps4Category: 0 + ps4MasterVersion: 01.00 + ps4AppVersion: 01.00 + ps4AppType: 0 + ps4ParamSfxPath: + ps4VideoOutPixelFormat: 0 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4ExtraSceSysFile: + ps4NPtitleDatPath: + ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 + ps4EnterButtonAssignment: 1 + ps4ApplicationParam1: 0 + ps4ApplicationParam2: 0 + ps4ApplicationParam3: 0 + ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 + ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + ps4pnSessions: 1 + ps4pnPresence: 1 + ps4pnFriends: 1 + ps4pnGameCustomData: 1 + playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4UseLowGarlicFragmentationMode: 1 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 0 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 + ps4GPU800MHz: 1 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 + monoEnv: + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 + spritePackerPolicy: + webGLMemorySize: 16 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 1 + webGLWasmArithmeticExceptions: 0 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 + webGLPowerPreference: 2 + webGLWebAssemblyTable: 0 + webGLWebAssemblyBigInt: 0 + webGLCloseOnQuit: 0 + webWasm2023: 1 + webEnableSubmoduleStrippingCompatibility: 0 + webProgressiveAssetLoading: 0 + scriptingDefineSymbols: + Standalone: NGO_MINIMALPROJECT + additionalCompilerArguments: {} + platformArchitecture: {} + scriptingBackend: + Android: 0 + il2cppCompilerConfiguration: {} + il2cppCodeGeneration: {} + il2cppLTOMode: {} + il2cppStacktraceInformation: {} + managedStrippingLevel: + Android: 1 + EmbeddedLinux: 1 + GameCoreScarlett: 1 + GameCoreXboxOne: 1 + Kepler: 1 + Nintendo Switch: 1 + Nintendo Switch 2: 1 + PS4: 1 + PS5: 1 + QNX: 1 + VisionOS: 1 + WebGL: 1 + Windows Store Apps: 1 + XboxOne: 1 + iPhone: 1 + tvOS: 1 + incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 + allowUnsafeCode: 0 + useDeterministicCompilation: 1 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + gcIncremental: 1 + gcWBarrierValidation: 0 + managedCodeVariant: {} + apiCompatibilityLevelPerPlatform: {} + editorAssembliesCompatibilityLevel: 1 + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: Template_3D + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: Template_3D + wsaImages: {} + metroTileShortName: + metroTileShowName: 0 + metroMediumTileShowName: 0 + metroLargeTileShowName: 0 + metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 + metroDefaultTileSize: 1 + metroTileForegroundText: 2 + metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} + metroSplashScreenUseBackgroundColor: 0 + syncCapabilities: 0 + platformCapabilities: {} + metroTargetDeviceFamilies: {} + metroFTAName: + metroFTAFileTypes: [] + metroProtocolName: + vcxProjDefaultLanguage: + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 + XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 + XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} + XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 + XboxOneEnableGPUVariability: 1 + XboxOneSockets: {} + XboxOneSplashScreen: {fileID: 0} + XboxOneAllowedProductIds: [] + XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 + XboxOneOverrideIdentityName: + XboxOneOverrideIdentityPublisher: + cloudServicesEnabled: + UNet: 1 + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_SignPackage: 1 + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + hmiPlayerDataPath: + hmiForceSRGBBlit: 0 + embeddedLinuxEnableGamepadInput: 0 + hmiCpuConfiguration: + hmiLogStartupTiming: 0 + qnxGraphicConfPath: + apiCompatibilityLevel: 6 + captureStartupLogs: {} + activeInputHandler: 0 + windowsGamepadBackendHint: 0 + enableDirectStorage: 0 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] + projectName: + organizationId: + cloudEnabled: 0 + legacyClampBlendShapeWeights: 0 + hmiLoadingImage: {fileID: 0} + platformRequiresReadableAssets: 0 + virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0 + androidVulkanDenyFilterList: [] + androidVulkanAllowFilterList: [] + androidVulkanDeviceFilterListAsset: {fileID: 0} + d3d12DeviceFilterListAsset: {fileID: 0} + webGPUDeviceFilterListAsset: {fileID: 0} + allowedHttpConnections: 3 diff --git a/apiupdaterproject/ProjectSettings/ProjectVersion.txt b/apiupdaterproject/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000000..05b85b7612 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 6000.7.0a5 +m_EditorVersionWithRevision: 6000.7.0a5 (a15235a53881) diff --git a/apiupdaterproject/ProjectSettings/QualitySettings.asset b/apiupdaterproject/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000000..7b7658d6eb --- /dev/null +++ b/apiupdaterproject/ProjectSettings/QualitySettings.asset @@ -0,0 +1,232 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 5 + m_QualitySettings: + - serializedVersion: 2 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 1 + textureQuality: 1 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.3 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.4 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 1 + lodBias: 0.7 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 70 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1.5 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 2 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + m_PerPlatformDefaultQuality: + Android: 2 + Lumin: 5 + Nintendo 3DS: 5 + Nintendo Switch: 5 + PS4: 5 + PSP2: 2 + Stadia: 5 + Standalone: 5 + WebGL: 3 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/apiupdaterproject/ProjectSettings/TagManager.asset b/apiupdaterproject/ProjectSettings/TagManager.asset new file mode 100644 index 0000000000..1c92a7840e --- /dev/null +++ b/apiupdaterproject/ProjectSettings/TagManager.asset @@ -0,0 +1,43 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 2 + tags: [] + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 diff --git a/apiupdaterproject/ProjectSettings/TimeManager.asset b/apiupdaterproject/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000000..558a017e1f --- /dev/null +++ b/apiupdaterproject/ProjectSettings/TimeManager.asset @@ -0,0 +1,9 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + Fixed Timestep: 0.02 + Maximum Allowed Timestep: 0.33333334 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/apiupdaterproject/ProjectSettings/UnityConnectSettings.asset b/apiupdaterproject/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000000..6125b308af --- /dev/null +++ b/apiupdaterproject/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/apiupdaterproject/ProjectSettings/VFXManager.asset b/apiupdaterproject/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000000..3a95c98bec --- /dev/null +++ b/apiupdaterproject/ProjectSettings/VFXManager.asset @@ -0,0 +1,12 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 diff --git a/apiupdaterproject/ProjectSettings/VersionControlSettings.asset b/apiupdaterproject/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000000..dca288142f --- /dev/null +++ b/apiupdaterproject/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/apiupdaterproject/ProjectSettings/XRSettings.asset b/apiupdaterproject/ProjectSettings/XRSettings.asset new file mode 100644 index 0000000000..482590c196 --- /dev/null +++ b/apiupdaterproject/ProjectSettings/XRSettings.asset @@ -0,0 +1,10 @@ +{ + "m_SettingKeys": [ + "VR Device Disabled", + "VR Device User Alert" + ], + "m_SettingValues": [ + "False", + "False" + ] +} \ No newline at end of file diff --git a/apiupdaterproject/README.md b/apiupdaterproject/README.md new file mode 100644 index 0000000000..0548569e7c --- /dev/null +++ b/apiupdaterproject/README.md @@ -0,0 +1,121 @@ +# API updater upgrade-path project + +A small Unity project whose only job is to prove that an **NGO 2.x** project's editor scripts are +migrated automatically when the package is upgraded to **NGO 3.x**. + +NGO 3.0 renamed the editor assembly and its namespaces: + +| 2.x | 3.x | +| --- | --- | +| `Unity.Netcode.Editor` (assembly) | `Unity.Netcode.GameObjects.Editor` | +| `Unity.Netcode.Editor` (namespace) | `Unity.Netcode.GameObjects.Editor` | +| `Unity.Netcode.Editor.Configuration` | `Unity.Netcode.GameObjects.Editor.Configuration` | +| `Unity.Netcode.Editor.CodeGen` | `Unity.Netcode.GameObjects.Editor.CodeGen` | +| `Unity.Netcode.PackageChecker.Editor` | `Unity.Netcode.GameObjects.PackageChecker.Editor` | + +## How the migration works + +Every relocated public editor type carries + +```csharp +[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] +``` + +(`"Unity.Netcode.Editor.Configuration"` as the source namespace for the two types that were in it). +The arguments are `autoUpdateAPI, sourceNamespace, sourceAssembly, sourceClassName` — a null class +name means the type name itself did not change. + +A 2.x reference no longer resolves, so the compiler reports CS0246/CS0234. Unity's `ScriptUpdater` +consults the `MovedFrom` data extracted from the referenced assemblies, matches the old +namespace/assembly, and rewrites the reference. Nothing extra ships: no skeleton assembly, no +duplicate API surface. + +`MovedFrom` is consulted **only** for references that fail to resolve. That is why the old namespace +must not be kept alive by anything — a type that still resolves never reaches the MovedFrom path. + +### Why not `[Obsolete(... (UnityUpgradable))]` skeletons + +That is the other mechanism for this, and it was measured first: a second assembly declaring an empty +skeleton of each 2.x type under the old namespace, each carrying +`[Obsolete("... (UnityUpgradable) -> [asm] ns.Type", true)]`. It works for every non-generic type, but + +* it **cannot** relocate a generic type — a target carrying a type argument list is treated as a + same-namespace *rename*, so the namespace and assembly are dropped (see the table below), which + left `NetcodeEditorBase` needing `MovedFrom` anyway; +* it costs a second assembly and a hand-maintained parallel API surface that has to track the real + one's `#if` guards and eventually be deleted; +* it leaves the stale `using` directives and expands namespace aliases at the reference site, where + `MovedFrom` removes the dead usings and rewrites aliases in place. + +What it buys, and `MovedFrom` does not, is a better error when the user *declines* the update: +`'NetworkManagerEditor' is obsolete: ... Use Unity.Netcode.GameObjects.Editor.NetworkManagerEditor +instead` rather than a bare CS0246. It is also the only route for member-level redirects (a renamed +method, a changed signature) and for type *renames*, which `MovedFrom` explicitly does not support. +Neither applies to this change — it is a pure relocation. + +## Running it + +```powershell +.\run-upgrade-test.ps1 -UnityExe "C:\Program Files\Unity\Hub\Editor\\Editor\Unity.exe" +``` + +The script imports the project in batch mode with `-accept-apiupdate`, then asserts that every 2.x +type reference under `Assets/Editor` was rewritten and that none survived. It restores the 2.x +sources when it finishes, so it can be re-run; pass `-KeepUpdatedSources` to inspect exactly what the +updater produced (`git diff` then shows the rewrite). `-Clean` purges `Library` first for a cold +import. + +`-UnityExe` may be omitted if `UNITY_EDITOR_PATH` is set or if the hub has the version named in +`ProjectSettings/ProjectVersion.txt`. + +## Contents + +| Path | What it covers | +| --- | --- | +| `Assets/Editor/DeprecatedApiUsage.cs` | Every public 2.x editor type through `using` + simple name | +| `Assets/Editor/DeprecatedApiUsageQualified.cs` | Fully qualified names, namespace alias, type alias, base type, `typeof`, generic | +| `Assets/UpgradeProbeBehaviour.cs` | The `MonoBehaviour` used as the `NetcodeEditorBase` type argument | + +`UpgradeProbeBehaviour` exists so the test does not name NGO's `NetworkManager`: com.unity.transport +6.6.0 — the builtin on some 6000.6 editors — ships a `Unity.Netcode.NetworkManager` of its own in +`Unity.Networking.Transport.NetcodeInterop`, which makes any `NetworkManager` reference from an +auto-referencing assembly like `Assembly-CSharp-Editor` CS0433-ambiguous. The type argument is +incidental to what is being measured, so a local `MonoBehaviour` keeps the test independent of the +resolved transport version. + +**Do not "fix" the sources under `Assets/Editor`.** They are deliberately written against the 2.x API +— they are the input to the test. + +## Measured behaviour + +Probed against 6000.7.0a5 with throwaway types, for a namespace + assembly move: + +| Mechanism / `(UnityUpgradable)` target form | Non-generic type | Generic type | +| --- | --- | --- | +| `[Asm] Ns.Type` | rewritten, fully qualified | name replaced, namespace dropped | +| `[Asm] Ns.Type` | n/a | name replaced, namespace dropped (a no-op when the name is unchanged) | +| `[Asm] Ns.Type`1` | n/a | backtick emitted into the source verbatim | +| `* [Asm] Ns.Type` | n/a | not rewritten | +| `[MovedFrom(true, oldNs, oldAsm, null)]` | rewritten, fully qualified | rewritten, fully qualified | + +Reference forms `MovedFrom` was confirmed to handle, via this project's two source files: `using` + +simple name, fully qualified name, namespace alias, type alias, base type, `typeof`, and generic type +argument. The dead `using Unity.Netcode.Editor;` directives are removed and namespace aliases are +rewritten in place rather than expanded at each use. + +## Known gap: assembly definition references + +The updater rewrites C# source only; it does not touch `.asmdef` files. + +References made **by GUID** — the Unity default — keep working untouched. A GUID reference resolves +to whichever `.asmdef` *asset* carries that GUID, independent of the `name` field inside it, and +`Editor/Unity.Netcode.Editor.asmdef` kept both its path and its GUID through the rename. So a 2.x +project referencing it by GUID silently ends up referencing `Unity.Netcode.GameObjects.Editor`. + +References made **by name** (`"Unity.Netcode.Editor"`) no longer resolve and have to be repointed at +`Unity.Netcode.GameObjects.Editor` by hand. The same applies to the other renamed assemblies: +`Unity.Netcode.Editor.CodeGen` and `Unity.Netcode.PackageChecker.Editor`. Nothing can be done about +this from the package side — reviving the old assembly name is not an option, because +`Unity.Netcode.Editor` differs from N4E's `Unity.NetCode.Editor` only by the case of one letter and +the two `Library/ScriptAssemblies/*.dll` filenames collide when both packages are installed. Removing +that collision is what the 3.0 rename is for. diff --git a/apiupdaterproject/run-upgrade-test.ps1 b/apiupdaterproject/run-upgrade-test.ps1 new file mode 100644 index 0000000000..e00d026dc9 --- /dev/null +++ b/apiupdaterproject/run-upgrade-test.ps1 @@ -0,0 +1,169 @@ +<# +.SYNOPSIS +Verifies that Unity's obsolete API updater rewrites NGO 2.x editor API references to their +NGO 3.x `Unity.Netcode.GameObjects.Editor` equivalents. + +.DESCRIPTION +Runs the editor over this project in batch mode with -accept-apiupdate, then asserts that every +`Unity.Netcode.Editor` reference under Assets/Editor was rewritten and that no stale reference +survived. The sources are restored afterwards so the test can be re-run, unless -KeepUpdatedSources +is passed (useful for eyeballing exactly what the updater produced). + +.EXAMPLE +.\run-upgrade-test.ps1 +.EXAMPLE +.\run-upgrade-test.ps1 -UnityExe "C:\Program Files\Unity\Hub\Editor\6000.5.3f1\Editor\Unity.exe" -Clean +#> +[CmdletBinding()] +param( + # Editor to run. Defaults to $env:UNITY_EDITOR_PATH, then to the hub install matching + # ProjectSettings/ProjectVersion.txt. + [string]$UnityExe, + + # Delete Library first, so the updater runs against a cold import. + [switch]$Clean, + + # Leave the rewritten sources in place instead of restoring the 2.x originals. + [switch]$KeepUpdatedSources +) + +$ErrorActionPreference = 'Stop' +$projectPath = $PSScriptRoot +$sourceDir = Join-Path $projectPath 'Assets\Editor' +$logFile = Join-Path $projectPath 'upgrade-test.log' + +function Remove-DirectoryRobust { + # Library/PackageCache holds paths past MAX_PATH that Remove-Item cannot delete - and a partial + # delete leaves a project that fails to compile for unrelated reasons. Empty the tree with + # robocopy /MIR first, which is not subject to the limit, then drop the (now shallow) root. + param([string]$Path) + + $empty = Join-Path ([System.IO.Path]::GetTempPath()) ('empty-' + [guid]::NewGuid().ToString('N')) + New-Item -ItemType Directory -Path $empty | Out-Null + try { + # robocopy returns 0-7 for success; anything higher is a real failure. + & robocopy $empty $Path /MIR /NFL /NDL /NJH /NJS /NC /NS /NP | Out-Null + if ($LASTEXITCODE -ge 8) { throw "robocopy failed purging $Path (exit $LASTEXITCODE)" } + Remove-Item -Recurse -Force $Path + } + finally { + Remove-Item -Recurse -Force $empty + } +} + +function Resolve-UnityExe { + param([string]$Explicit) + + if ($Explicit) { + if (-not (Test-Path $Explicit)) { throw "Editor not found: $Explicit" } + return $Explicit + } + if ($env:UNITY_EDITOR_PATH) { + if (-not (Test-Path $env:UNITY_EDITOR_PATH)) { throw "UNITY_EDITOR_PATH does not exist: $($env:UNITY_EDITOR_PATH)" } + return $env:UNITY_EDITOR_PATH + } + + $versionFile = Join-Path $projectPath 'ProjectSettings\ProjectVersion.txt' + $version = (Select-String -Path $versionFile -Pattern '^m_EditorVersion:\s*(.+)$').Matches[0].Groups[1].Value.Trim() + $candidate = "C:\Program Files\Unity\Hub\Editor\$version\Editor\Unity.exe" + if (Test-Path $candidate) { return $candidate } + + throw "No editor found for $version. Pass -UnityExe or set UNITY_EDITOR_PATH." +} + +# Every 2.x type the sources reference, and what the updater is expected to turn it into. +# Frozen: this is the public editor API of develop-2.0.0, which is released and will not change. +# Extend it by hand if a public editor type is ever relocated again within 3.x. +$expected = @( + @{ Old = 'Unity.Netcode.Editor.HiddenScriptEditor'; New = 'Unity.Netcode.GameObjects.Editor.HiddenScriptEditor' } + @{ Old = 'Unity.Netcode.Editor.UnityTransportEditor'; New = 'Unity.Netcode.GameObjects.Editor.UnityTransportEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkAnimatorEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkAnimatorEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkRigidbodyEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkRigidbodyEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkRigidbody2DEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkRigidbody2DEditor' } + @{ Old = 'Unity.Netcode.Editor.NetcodeEditorBase'; New = 'Unity.Netcode.GameObjects.Editor.NetcodeEditorBase' } + @{ Old = 'Unity.Netcode.Editor.NetworkBehaviourEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkBehaviourEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkManagerEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkManagerEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkManagerHelper'; New = 'Unity.Netcode.GameObjects.Editor.NetworkManagerHelper' } + @{ Old = 'Unity.Netcode.Editor.NetworkObjectEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkObjectEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkRigidbodyBaseEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkRigidbodyBaseEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkTransformEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkTransformEditor' } + @{ Old = 'Unity.Netcode.Editor.NetworkPrefabsEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkPrefabsEditor' } + @{ Old = 'Unity.Netcode.Editor.Configuration.NetcodeForGameObjectsProjectSettings'; New = 'Unity.Netcode.GameObjects.Editor.Configuration.NetcodeForGameObjectsProjectSettings' } + @{ Old = 'Unity.Netcode.Editor.Configuration.NetworkPrefabProcessor'; New = 'Unity.Netcode.GameObjects.Editor.Configuration.NetworkPrefabProcessor' } +) + +$unity = Resolve-UnityExe -Explicit $UnityExe +Write-Host "Editor: $unity" +Write-Host "Project: $projectPath" + +$backupDir = Join-Path ([System.IO.Path]::GetTempPath()) ("ngo-apiupdater-" + [guid]::NewGuid().ToString('N')) +New-Item -ItemType Directory -Path $backupDir | Out-Null +Copy-Item -Path (Join-Path $sourceDir '*') -Destination $backupDir -Recurse + +try { + if ($Clean) { + foreach ($stale in @('Library', 'Temp')) { + $target = Join-Path $projectPath $stale + if (Test-Path $target) { + Write-Host "Removing $stale ..." + Remove-DirectoryRobust -Path $target + } + } + } + + if (Test-Path $logFile) { Remove-Item -Force $logFile } + + $unityArgs = @( + '-batchmode', '-nographics', '-quit', + '-accept-apiupdate', + '-ignoreCompilerErrors', + '-burst-disable-compilation', + '-projectPath', $projectPath, + '-logFile', $logFile + ) + + Write-Host 'Running the editor (this imports the project and runs the API updater)...' + $process = Start-Process -FilePath $unity -ArgumentList $unityArgs -PassThru -Wait -NoNewWindow + Write-Host "Editor exit code: $($process.ExitCode)" + + $allText = (Get-ChildItem -Path $sourceDir -Filter *.cs | ForEach-Object { Get-Content -Raw $_.FullName }) -join "`n" + + $results = foreach ($entry in $expected) { + # A rewritten reference contains the new name; the old name only ever survives as a distinct + # token, so require at least one new hit and no old hit that is not part of a longer name. + $newHits = ([regex]::Matches($allText, [regex]::Escape($entry.New))).Count + $oldHits = ([regex]::Matches($allText, [regex]::Escape($entry.Old) + '(?![\w.])')).Count + if ($newHits -gt 0 -and $oldHits -eq 0) { $result = 'PASS' } else { $result = 'FAIL' } + [pscustomobject]@{ + Type = $entry.Old + Updated = $newHits + Stale = $oldHits + Result = $result + } + } + + $results | Format-Table -AutoSize + $failures = @($results | Where-Object { $_.Result -eq 'FAIL' }) + + Write-Host '' + if ($failures.Count -eq 0) { + Write-Host "PASS: all $($expected.Count) deprecated editor types were rewritten." -ForegroundColor Green + } + else { + Write-Host "FAIL: $($failures.Count) of $($expected.Count) types were not rewritten. See $logFile" -ForegroundColor Red + } + + if ($KeepUpdatedSources) { + Write-Host "Rewritten sources left in place under Assets/Editor (backup: $backupDir)." + } + + # Explicit, or the exit code falls through to the last native command (robocopy, which reports + # non-zero for ordinary success). + if ($failures.Count -ne 0) { exit 1 } else { exit 0 } +} +finally { + if (-not $KeepUpdatedSources) { + Copy-Item -Path (Join-Path $backupDir '*') -Destination $sourceDir -Recurse -Force + Remove-Item -Recurse -Force $backupDir + } +} From e6cffd648f7c63c38b39f00828430812a9498dcb Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 24 Aug 2026 15:48:57 -0500 Subject: [PATCH 03/12] Remove unused NetworkObjectOwnership property drawer Removed obsolete custom property drawer for NetworkObject.OwnershipStatus. --- .../Editor/NetworkObjectEditor.cs | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs index 1b53e095d5..a2246189ef 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs @@ -221,53 +221,4 @@ private void OnDestroy() NetworkBehaviourEditor.CheckForNetworkObject(m_GameObject, true); } } - - // Keeping this here just in case, but it appears that in Unity 6 the visual bugs with - // enum flags is resolved -#if BYPASS_DEFAULT_ENUM_DRAWER && MULTIPLAYER_SERVICES_SDK_INSTALLED - [CustomPropertyDrawer(typeof(NetworkObject.OwnershipStatus))] - [MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] - public class NetworkObjectOwnership : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - label = EditorGUI.BeginProperty(position, label, property); - // Don't allow modification while in play mode - EditorGUI.BeginDisabledGroup(EditorApplication.isPlaying); - - // This is a temporary work around due to EditorGUI.EnumFlagsField having a bug in how it displays mask values. - // For now, we will just display the flags as a toggle and handle the masking of the value ourselves. - EditorGUILayout.BeginHorizontal(); - var names = System.Enum.GetNames(typeof(NetworkObject.OwnershipStatus)).ToList(); - names.RemoveAt(0); - var value = property.enumValueFlag; - var compareValue = 0x01; - GUILayout.Label(label); - foreach (var name in names) - { - var isSet = (value & compareValue) > 0; - isSet = GUILayout.Toggle(isSet, name); - if (isSet) - { - value |= compareValue; - } - else - { - value &= ~compareValue; - } - compareValue = compareValue << 1; - } - property.enumValueFlag = value; - EditorGUILayout.EndHorizontal(); - - // The below can cause visual anomalies and/or throws an exception within the EditorGUI itself (index out of bounds of the array). and has - // The visual anomaly is when you select one field it is set in the drop down but then the flags selection in the popup menu selects more items - // even though if you exit the popup menu the flag setting is correct. - // var ownership = (NetworkObject.OwnershipStatus)EditorGUI.EnumFlagsField(position, label, (NetworkObject.OwnershipStatus)property.enumValueFlag); - // property.enumValueFlag = (int)ownership; - EditorGUI.EndDisabledGroup(); - EditorGUI.EndProperty(); - } - } -#endif } From eee7cfe4445d87145d4cf08f73573227ee58552d Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 24 Aug 2026 15:54:13 -0500 Subject: [PATCH 04/12] fix Handling paths with spaces. --- apiupdaterproject/run-upgrade-test.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apiupdaterproject/run-upgrade-test.ps1 b/apiupdaterproject/run-upgrade-test.ps1 index e00d026dc9..d6686261f5 100644 --- a/apiupdaterproject/run-upgrade-test.ps1 +++ b/apiupdaterproject/run-upgrade-test.ps1 @@ -113,13 +113,17 @@ try { if (Test-Path $logFile) { Remove-Item -Force $logFile } + # Start-Process joins -ArgumentList into one command line without quoting the individual values, + # and ProcessStartInfo.ArgumentList does not exist on the .NET Framework that Windows PowerShell + # runs on - so quote the two paths here or a checkout under "C:\Users\Jane Doe\..." splits at the + # space and Unity receives an invalid -projectPath/-logFile. $unityArgs = @( '-batchmode', '-nographics', '-quit', '-accept-apiupdate', '-ignoreCompilerErrors', '-burst-disable-compilation', - '-projectPath', $projectPath, - '-logFile', $logFile + '-projectPath', "`"$projectPath`"", + '-logFile', "`"$logFile`"" ) Write-Host 'Running the editor (this imports the project and runs the API updater)...' From 5ab008d7d39b5a66ad43fbbb98aaf07389e31229 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 24 Aug 2026 15:56:51 -0500 Subject: [PATCH 05/12] update Remove this too as we don't need that work around. --- com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs index a2246189ef..d5dd23b09d 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkObjectEditor.cs @@ -1,7 +1,4 @@ using System.Collections.Generic; -#if BYPASS_DEFAULT_ENUM_DRAWER && MULTIPLAYER_SERVICES_SDK_INSTALLED -using System.Linq; -#endif #if UNIFIED_NETCODE using Unity.NetCode; using Unity.NetCode.Editor; From bf9a90ab4ce8d063f79a4f7fa9855848605d2027 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 16:08:22 -0500 Subject: [PATCH 06/12] update Adjusting README to be less verbose. Adding agent.md file to keep context. --- apiupdaterproject/AGENTS.md | 76 +++++++++++++++++++++ apiupdaterproject/README.md | 130 ++++++++++++++---------------------- 2 files changed, 126 insertions(+), 80 deletions(-) create mode 100644 apiupdaterproject/AGENTS.md diff --git a/apiupdaterproject/AGENTS.md b/apiupdaterproject/AGENTS.md new file mode 100644 index 0000000000..ac4d0670b0 --- /dev/null +++ b/apiupdaterproject/AGENTS.md @@ -0,0 +1,76 @@ +# apiupdaterproject — agent notes + +Background for anyone changing this project or the relocation metadata it tests. `README.md` covers +what it is and how to run it; this file covers why it is built this way and what will bite you. + +## Orientation + +* This is a standalone Unity project at the repo root. It is not part of `testproject` or + `minimalproject`, and the package does not reference it. +* It validates one thing end to end: that a project written against the **NGO 2.x** editor API is + migrated automatically by Unity's API updater when the package is upgraded to **3.x**. +* **The mechanism it tests does not live here.** The `[MovedFrom]` attributes are on the real types in + `com.unity.netcode.gameobjects/Editor/**`. This project only consumes them. +* **Do not "fix" the sources under `Assets/Editor`.** They are deliberately written against the 2.x + API and are the input to the test. A helpful cleanup there silently guts it. +* The expected-type list in the run scripts is frozen: it enumerates the public editor API of + `develop-2.0.0`, which is released and cannot change. It only needs extending if a public editor + type is relocated again within 3.x. +* CI runs it on demand only — comment `/ci apiupdater` on a PR. See `.yamato/api-updater-test.yml`. +* Verified beyond this project: a real sample project upgraded 7 of its own scripts automatically, + including a `NetcodeEditorBase` subclass. + +## Why not `[Obsolete(... (UnityUpgradable))]` skeletons + +That is the other mechanism for this, and it was measured first: a second assembly declaring an empty +skeleton of each 2.x type under the old namespace, each carrying +`[Obsolete("... (UnityUpgradable) -> [asm] ns.Type", true)]`. It works for every non-generic type, but + +* it **cannot** relocate a generic type — a target carrying a type argument list is treated as a + same-namespace *rename*, so the namespace and assembly are dropped (see the table below), which + left `NetcodeEditorBase` needing `MovedFrom` anyway; +* it costs a second assembly and a hand-maintained parallel API surface that has to track the real + one's `#if` guards and eventually be deleted; +* it leaves the stale `using` directives and expands namespace aliases at the reference site, where + `MovedFrom` removes the dead usings and rewrites aliases in place. + +What it buys, and `MovedFrom` does not, is a better error when the user *declines* the update: +`'NetworkManagerEditor' is obsolete: ... Use Unity.Netcode.GameObjects.Editor.NetworkManagerEditor +instead` rather than a bare CS0246. It is also the only route for member-level redirects (a renamed +method, a changed signature) and for type *renames*, which `MovedFrom` explicitly does not support. +Neither applies to this change — it is a pure relocation. + +## Measured behaviour + +Probed against 6000.7.0a5 with throwaway types, for a namespace + assembly move: + +| Mechanism / `(UnityUpgradable)` target form | Non-generic type | Generic type | +| --- | --- | --- | +| `[Asm] Ns.Type` | rewritten, fully qualified | name replaced, namespace dropped | +| `[Asm] Ns.Type` | n/a | name replaced, namespace dropped (a no-op when the name is unchanged) | +| ``[Asm] Ns.Type`1`` | n/a | backtick emitted into the source verbatim | +| `* [Asm] Ns.Type` | n/a | not rewritten | +| `[MovedFrom(true, oldNs, oldAsm, null)]` | rewritten, fully qualified | rewritten, fully qualified | + +Reference forms `MovedFrom` was confirmed to handle, via `Assets/Editor/DeprecatedApiUsage.cs` and +`Assets/Editor/DeprecatedApiUsageQualified.cs`: `using` + simple name, fully qualified name, namespace +alias, type alias, base type, `typeof`, and generic type argument. The dead +`using Unity.Netcode.Editor;` directives are removed and namespace aliases are rewritten in place +rather than expanded at each use. + +## Known gap: assembly definition references + +The updater rewrites C# source only; it does not touch `.asmdef` files. + +References made **by GUID** — the Unity default — keep working untouched. A GUID reference resolves +to whichever `.asmdef` *asset* carries that GUID, independent of the `name` field inside it, and +`Editor/Unity.Netcode.Editor.asmdef` kept both its path and its GUID through the rename. So a 2.x +project referencing it by GUID silently ends up referencing `Unity.Netcode.GameObjects.Editor`. + +References made **by name** (`"Unity.Netcode.Editor"`) no longer resolve and have to be repointed at +`Unity.Netcode.GameObjects.Editor` by hand. The same applies to the other renamed assemblies: +`Unity.Netcode.Editor.CodeGen` and `Unity.Netcode.PackageChecker.Editor`. Nothing can be done about +this from the package side — reviving the old assembly name is not an option, because +`Unity.Netcode.Editor` differs from N4E's `Unity.NetCode.Editor` only by the case of one letter and +the two `Library/ScriptAssemblies/*.dll` filenames collide when both packages are installed. Removing +that collision is what the 3.0 rename is for. diff --git a/apiupdaterproject/README.md b/apiupdaterproject/README.md index 0548569e7c..3322b00429 100644 --- a/apiupdaterproject/README.md +++ b/apiupdaterproject/README.md @@ -1,7 +1,7 @@ # API updater upgrade-path project -A small Unity project whose only job is to prove that an **NGO 2.x** project's editor scripts are -migrated automatically when the package is upgraded to **NGO 3.x**. +This project validates that an **NGO 2.x** project's scripts are migrated automatically when upgrading to **NGO 3.x**. + NGO 3.0 renamed the editor assembly and its namespaces: @@ -13,60 +13,11 @@ NGO 3.0 renamed the editor assembly and its namespaces: | `Unity.Netcode.Editor.CodeGen` | `Unity.Netcode.GameObjects.Editor.CodeGen` | | `Unity.Netcode.PackageChecker.Editor` | `Unity.Netcode.GameObjects.PackageChecker.Editor` | -## How the migration works - -Every relocated public editor type carries - -```csharp -[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] -``` - -(`"Unity.Netcode.Editor.Configuration"` as the source namespace for the two types that were in it). -The arguments are `autoUpdateAPI, sourceNamespace, sourceAssembly, sourceClassName` — a null class -name means the type name itself did not change. - -A 2.x reference no longer resolves, so the compiler reports CS0246/CS0234. Unity's `ScriptUpdater` -consults the `MovedFrom` data extracted from the referenced assemblies, matches the old -namespace/assembly, and rewrites the reference. Nothing extra ships: no skeleton assembly, no -duplicate API surface. - -`MovedFrom` is consulted **only** for references that fail to resolve. That is why the old namespace -must not be kept alive by anything — a type that still resolves never reaches the MovedFrom path. - -### Why not `[Obsolete(... (UnityUpgradable))]` skeletons - -That is the other mechanism for this, and it was measured first: a second assembly declaring an empty -skeleton of each 2.x type under the old namespace, each carrying -`[Obsolete("... (UnityUpgradable) -> [asm] ns.Type", true)]`. It works for every non-generic type, but - -* it **cannot** relocate a generic type — a target carrying a type argument list is treated as a - same-namespace *rename*, so the namespace and assembly are dropped (see the table below), which - left `NetcodeEditorBase` needing `MovedFrom` anyway; -* it costs a second assembly and a hand-maintained parallel API surface that has to track the real - one's `#if` guards and eventually be deleted; -* it leaves the stale `using` directives and expands namespace aliases at the reference site, where - `MovedFrom` removes the dead usings and rewrites aliases in place. -What it buys, and `MovedFrom` does not, is a better error when the user *declines* the update: -`'NetworkManagerEditor' is obsolete: ... Use Unity.Netcode.GameObjects.Editor.NetworkManagerEditor -instead` rather than a bare CS0246. It is also the only route for member-level redirects (a renamed -method, a changed signature) and for type *renames*, which `MovedFrom` explicitly does not support. -Neither applies to this change — it is a pure relocation. - -## Running it - -```powershell -.\run-upgrade-test.ps1 -UnityExe "C:\Program Files\Unity\Hub\Editor\\Editor\Unity.exe" -``` - -The script imports the project in batch mode with `-accept-apiupdate`, then asserts that every 2.x -type reference under `Assets/Editor` was rewritten and that none survived. It restores the 2.x -sources when it finishes, so it can be re-run; pass `-KeepUpdatedSources` to inspect exactly what the -updater produced (`git diff` then shows the rewrite). `-Clean` purges `Library` first for a cold -import. +### NGO v2.x.x Unity.Netcode.Editor changes -`-UnityExe` may be omitted if `UNITY_EDITOR_PATH` is set or if the hub has the version named in -`ProjectSettings/ProjectVersion.txt`. +If there is a need to add new API to NGO v2.x.x, the above table should be updated and the DeprecatedApiUsage.cs +file or the DeprecatedApiUsageQualified.cs files are updated to reflect the added API. ## Contents @@ -86,36 +37,55 @@ resolved transport version. **Do not "fix" the sources under `Assets/Editor`.** They are deliberately written against the 2.x API — they are the input to the test. -## Measured behaviour +## Running it locally -Probed against 6000.7.0a5 with throwaway types, for a namespace + assembly move: +The script imports the project in batch mode with `-accept-apiupdate`, then asserts that every 2.x +type reference under `Assets/Editor` was rewritten and that none survived. It restores the 2.x +sources when it finishes, so it can be re-run. + +| Option | | +| --- | --- | +| editor path | Omit it if `UNITY_EDITOR_PATH` is set, or if the hub has the version named in `ProjectSettings/ProjectVersion.txt`. | +| keep updated sources | Leaves the rewritten sources in place so `git diff` shows exactly what the updater produced. | +| clean | Purges `Library` and `Temp` first for a cold import. | + +### Windows + +```powershell +.\run-upgrade-test.ps1 -UnityExe "C:\Program Files\Unity\Hub\Editor\\Editor\Unity.exe" -KeepUpdatedSources -Clean +``` + +### macOS + +The editor binary lives inside the `.app` bundle, not next to it. + +```sh +./run-upgrade-test.sh --unity "/Applications/Unity/Hub/Editor//Unity.app/Contents/MacOS/Unity" --keep-updated-sources --clean +``` + +### Linux + +```sh +./run-upgrade-test.sh --unity "$HOME/Unity/Hub/Editor//Editor/Unity" --keep-updated-sources --clean +``` -| Mechanism / `(UnityUpgradable)` target form | Non-generic type | Generic type | -| --- | --- | --- | -| `[Asm] Ns.Type` | rewritten, fully qualified | name replaced, namespace dropped | -| `[Asm] Ns.Type` | n/a | name replaced, namespace dropped (a no-op when the name is unchanged) | -| `[Asm] Ns.Type`1` | n/a | backtick emitted into the source verbatim | -| `* [Asm] Ns.Type` | n/a | not rewritten | -| `[MovedFrom(true, oldNs, oldAsm, null)]` | rewritten, fully qualified | rewritten, fully qualified | -Reference forms `MovedFrom` was confirmed to handle, via this project's two source files: `using` + -simple name, fully qualified name, namespace alias, type alias, base type, `typeof`, and generic type -argument. The dead `using Unity.Netcode.Editor;` directives are removed and namespace aliases are -rewritten in place rather than expanded at each use. +## How the migration works -## Known gap: assembly definition references +Every relocated public editor type carries -The updater rewrites C# source only; it does not touch `.asmdef` files. +```csharp +[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)] +``` -References made **by GUID** — the Unity default — keep working untouched. A GUID reference resolves -to whichever `.asmdef` *asset* carries that GUID, independent of the `name` field inside it, and -`Editor/Unity.Netcode.Editor.asmdef` kept both its path and its GUID through the rename. So a 2.x -project referencing it by GUID silently ends up referencing `Unity.Netcode.GameObjects.Editor`. +(`"Unity.Netcode.Editor.Configuration"` as the source namespace for the two types that were in it). +The arguments are `autoUpdateAPI, sourceNamespace, sourceAssembly, sourceClassName` — a null class +name means the type name itself did not change. -References made **by name** (`"Unity.Netcode.Editor"`) no longer resolve and have to be repointed at -`Unity.Netcode.GameObjects.Editor` by hand. The same applies to the other renamed assemblies: -`Unity.Netcode.Editor.CodeGen` and `Unity.Netcode.PackageChecker.Editor`. Nothing can be done about -this from the package side — reviving the old assembly name is not an option, because -`Unity.Netcode.Editor` differs from N4E's `Unity.NetCode.Editor` only by the case of one letter and -the two `Library/ScriptAssemblies/*.dll` filenames collide when both packages are installed. Removing -that collision is what the 3.0 rename is for. +A 2.x reference no longer resolves, so the compiler reports CS0246/CS0234. Unity's `ScriptUpdater` +consults the `MovedFrom` data extracted from the referenced assemblies, matches the old +namespace/assembly, and rewrites the reference. Nothing extra ships: no skeleton assembly, no +duplicate API surface. + +`MovedFrom` is consulted **only** for references that fail to resolve. That is why the old namespace +must not be kept alive by anything — a type that still resolves never reaches the MovedFrom path. From d2886685f6c0d38c06b7661b6f41ed8a72853adf Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 16:10:49 -0500 Subject: [PATCH 07/12] chore: add POSIX shell runner for the API updater upgrade test --- apiupdaterproject/run-upgrade-test.sh | 164 ++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100755 apiupdaterproject/run-upgrade-test.sh diff --git a/apiupdaterproject/run-upgrade-test.sh b/apiupdaterproject/run-upgrade-test.sh new file mode 100755 index 0000000000..1364e9e4c7 --- /dev/null +++ b/apiupdaterproject/run-upgrade-test.sh @@ -0,0 +1,164 @@ +#!/bin/sh +# Verifies that Unity's API updater rewrites NGO 2.x editor API references to their NGO 3.x +# Unity.Netcode.GameObjects.Editor equivalents. macOS and Linux; see run-upgrade-test.ps1 for Windows. +# +# Runs the editor over this project in batch mode with -accept-apiupdate, then asserts that every +# Unity.Netcode.Editor reference under Assets/Editor was rewritten and that no stale reference +# survived. The 2.x sources are restored on exit so the test can be re-run. +# +# ./run-upgrade-test.sh +# ./run-upgrade-test.sh --unity /Applications/Unity/Hub/Editor/6000.6.0b5/Unity.app/Contents/MacOS/Unity --clean +# +# --unity Editor binary. Defaults to $UNITY_EDITOR_PATH, then to the hub install +# matching ProjectSettings/ProjectVersion.txt. +# --clean Delete Library and Temp first, for a cold import. +# --keep-updated-sources Leave the rewritten sources in place instead of restoring the originals. + +set -eu + +PROJECT_PATH=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) +SOURCE_DIR="$PROJECT_PATH/Assets/Editor" +LOG_FILE="$PROJECT_PATH/upgrade-test.log" + +UNITY_EXE="" +CLEAN=0 +KEEP_UPDATED_SOURCES=0 + +while [ $# -gt 0 ]; do + case "$1" in + --unity) + [ $# -ge 2 ] || { echo "--unity requires a path" >&2; exit 2; } + UNITY_EXE="$2"; shift 2 ;; + --clean) CLEAN=1; shift ;; + --keep-updated-sources) KEEP_UPDATED_SOURCES=1; shift ;; + -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "Unknown argument: $1" >&2; exit 2 ;; + esac +done + +# Every 2.x type the sources reference, and what the updater is expected to turn it into. +# Frozen: this is the public editor API of develop-2.0.0, which is released and will not change. +# Extend it by hand if a public editor type is ever relocated again within 3.x. +EXPECTED_TYPES=" +Unity.Netcode.Editor.HiddenScriptEditor +Unity.Netcode.Editor.UnityTransportEditor +Unity.Netcode.Editor.NetworkAnimatorEditor +Unity.Netcode.Editor.NetworkRigidbodyEditor +Unity.Netcode.Editor.NetworkRigidbody2DEditor +Unity.Netcode.Editor.NetcodeEditorBase +Unity.Netcode.Editor.NetworkBehaviourEditor +Unity.Netcode.Editor.NetworkManagerEditor +Unity.Netcode.Editor.NetworkManagerHelper +Unity.Netcode.Editor.NetworkObjectEditor +Unity.Netcode.Editor.NetworkRigidbodyBaseEditor +Unity.Netcode.Editor.NetworkTransformEditor +Unity.Netcode.Editor.NetworkPrefabsEditor +Unity.Netcode.Editor.Configuration.NetcodeForGameObjectsProjectSettings +Unity.Netcode.Editor.Configuration.NetworkPrefabProcessor +" + +resolve_unity() { + if [ -n "$UNITY_EXE" ]; then + [ -x "$UNITY_EXE" ] || { echo "Editor not found or not executable: $UNITY_EXE" >&2; exit 1; } + echo "$UNITY_EXE"; return + fi + if [ -n "${UNITY_EDITOR_PATH:-}" ]; then + [ -x "$UNITY_EDITOR_PATH" ] || { echo "UNITY_EDITOR_PATH is not executable: $UNITY_EDITOR_PATH" >&2; exit 1; } + echo "$UNITY_EDITOR_PATH"; return + fi + + version=$(sed -n 's/^m_EditorVersion:[[:space:]]*\(.*\)$/\1/p' \ + "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt" | tr -d '\r' | head -n 1) + [ -n "$version" ] || { echo "Could not read m_EditorVersion from ProjectSettings/ProjectVersion.txt" >&2; exit 1; } + + # Default hub locations differ per platform, and the macOS editor lives inside the .app bundle. + case "$(uname -s)" in + Darwin) candidate="/Applications/Unity/Hub/Editor/$version/Unity.app/Contents/MacOS/Unity" ;; + *) candidate="$HOME/Unity/Hub/Editor/$version/Editor/Unity" ;; + esac + [ -x "$candidate" ] && { echo "$candidate"; return; } + + echo "No editor found for $version at $candidate. Pass --unity or set UNITY_EDITOR_PATH." >&2 + exit 1 +} + +UNITY=$(resolve_unity) +echo "Editor: $UNITY" +echo "Project: $PROJECT_PATH" + +BACKUP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/ngo-apiupdater-XXXXXX") +cp -R "$SOURCE_DIR/." "$BACKUP_DIR/" + +# Restore on any exit path, so an interrupted run does not leave rewritten sources behind. +# Guarded: trapping both EXIT and INT/TERM means this can be entered twice. +CLEANED=0 +cleanup() { + [ "$CLEANED" -eq 0 ] || return 0 + CLEANED=1 + if [ "$KEEP_UPDATED_SOURCES" -eq 0 ]; then + cp -R "$BACKUP_DIR/." "$SOURCE_DIR/" + rm -rf "$BACKUP_DIR" + fi +} +trap cleanup EXIT INT TERM + +if [ "$CLEAN" -eq 1 ]; then + for stale in Library Temp; do + if [ -d "$PROJECT_PATH/$stale" ]; then + echo "Removing $stale ..." + rm -rf "$PROJECT_PATH/$stale" + fi + done +fi + +rm -f "$LOG_FILE" + +echo "Running the editor (this imports the project and runs the API updater)..." +# The editor returns non-zero when compilation fails, which is the normal state before the updater +# rewrites the sources, so do not let set -e abort here. +EDITOR_STATUS=0 +"$UNITY" \ + -batchmode -nographics -quit \ + -accept-apiupdate \ + -ignoreCompilerErrors \ + -burst-disable-compilation \ + -projectPath "$PROJECT_PATH" \ + -logFile "$LOG_FILE" || EDITOR_STATUS=$? +echo "Editor exit code: $EDITOR_STATUS" + +ALL_TEXT=$(cat "$SOURCE_DIR"/*.cs) + +TOTAL=0 +FAILURES=0 +printf '\n%-72s %8s %6s %s\n' "TYPE" "UPDATED" "STALE" "RESULT" +for old in $EXPECTED_TYPES; do + TOTAL=$((TOTAL + 1)) + new="Unity.Netcode.GameObjects.${old#Unity.Netcode.}" + + updated=$(printf '%s' "$ALL_TEXT" | grep -o -F "$new" | wc -l | tr -d ' ') + # The old name only ever survives as a distinct token; a trailing word char or dot means it is + # really part of the longer new name, so exclude those. + stale=$(printf '%s' "$ALL_TEXT" | grep -oE "$(printf '%s' "$old" | sed 's/\./\\./g')([^A-Za-z0-9_.]|$)" | wc -l | tr -d ' ') + + if [ "$updated" -gt 0 ] && [ "$stale" -eq 0 ]; then + result="PASS" + else + result="FAIL" + FAILURES=$((FAILURES + 1)) + fi + printf '%-72s %8s %6s %s\n' "$old" "$updated" "$stale" "$result" +done + +echo "" +if [ "$FAILURES" -eq 0 ]; then + echo "PASS: all $TOTAL deprecated editor types were rewritten." +else + echo "FAIL: $FAILURES of $TOTAL types were not rewritten. See $LOG_FILE" +fi + +if [ "$KEEP_UPDATED_SOURCES" -eq 1 ]; then + echo "Rewritten sources left in place under Assets/Editor (backup: $BACKUP_DIR)." +fi + +[ "$FAILURES" -eq 0 ] || exit 1 +exit 0 From 9a317a67fa3c6005cdc48cce9c24f079e9f827a9 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 16:42:53 -0500 Subject: [PATCH 08/12] update Correction... making a single PYTHON script that stays in alignment with our CI scripting language usage. --- .yamato/_run-all.yml | 4 +- .yamato/api-updater-test.yml | 15 +- apiupdaterproject/AGENTS.md | 2 +- apiupdaterproject/README.md | 41 ++--- apiupdaterproject/run-upgrade-test.ps1 | 173 ------------------- apiupdaterproject/run-upgrade-test.sh | 164 ------------------ apiupdaterproject/run_upgrade_test.py | 224 +++++++++++++++++++++++++ 7 files changed, 250 insertions(+), 373 deletions(-) delete mode 100644 apiupdaterproject/run-upgrade-test.ps1 delete mode 100755 apiupdaterproject/run-upgrade-test.sh create mode 100644 apiupdaterproject/run_upgrade_test.py diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index 6236212b05..ee3389ec67 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -451,10 +451,8 @@ run_all_project_tests_cmb_service_default: run_all_api_updater_tests: name: Run All API Updater Tests dependencies: -{% for platform in test_platforms.desktop -%} -{% if platform.name == "win" -%} +{% for platform in test_platforms.default -%} {% for editor in validation_editors.default -%} - .yamato/api-updater-test.yml#api_updater_test_{{ platform.name }}_{{ editor }} {% endfor -%} -{% endif -%} {% endfor -%} diff --git a/.yamato/api-updater-test.yml b/.yamato/api-updater-test.yml index e6c5361b67..4d037feef7 100644 --- a/.yamato/api-updater-test.yml +++ b/.yamato/api-updater-test.yml @@ -19,8 +19,9 @@ # develop_nightly or develop_weekly_trunk in _triggers.yml. # CONFIGURATION STRUCTURE-------------------------------------------------------------- - # Windows only, and not looped over test_platforms: run-upgrade-test.ps1 is PowerShell and uses - # robocopy to purge Library (paths there exceed MAX_PATH, which Remove-Item cannot delete). + # Runs on the default platform (Ubuntu) like every other basic job. run_upgrade_test.py is Python, so + # there is no platform constraint - the earlier PowerShell version forced a Windows agent because it + # needed robocopy to purge Library past MAX_PATH. # A single editor is enough - the job is asserting on the editor's API updater, not on NGO # behaviour across editor versions. Widen to validation_editors.all if that stops being true. @@ -30,11 +31,11 @@ # and needs no package-pack dependency. # The script restores the 2.x sources when it finishes, so the checkout is left unmodified and the # job is safe to re-run on the same agent. - # -Clean purges Library first: the assertion is meaningless against a warm Library that already + # --clean purges Library first: the assertion is meaningless against a warm Library that already # holds rewritten sources from a previous run. # QUALITY CONSIDERATIONS-------------------------------------------------------------------- - # The expected type list in run-upgrade-test.ps1 is inline and hand-written. That is fine because + # The expected type list in run_upgrade_test.py is inline and hand-written. That is fine because # its input is frozen: it enumerates the 2.x public editor API, and develop-2.0.0 is released. # TODO: the list does not extend itself. A later relocation within 3.x, or a back port into 2.x, # has to be added by hand or this job silently stops covering it. Deriving the list from the @@ -42,8 +43,7 @@ #------------------------------------------------------------------------------------ -{% for platform in test_platforms.desktop -%} -{% if platform.name == "win" -%} +{% for platform in test_platforms.default -%} {% for editor in validation_editors.default -%} api_updater_test_{{ platform.name }}_{{ editor }}: name : API Updater Test - NGO 2.x editor scripts upgrade [{{ platform.name }}, {{ editor }}] @@ -53,7 +53,7 @@ api_updater_test_{{ platform.name }}_{{ editor }}: flavor: {{ platform.flavor }} commands: - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import - - powershell -NoProfile -ExecutionPolicy Bypass -File apiupdaterproject/run-upgrade-test.ps1 -UnityExe .Editor/Editor/Unity.exe -Clean + - python apiupdaterproject/run_upgrade_test.py --unity .Editor/Editor/Unity --clean artifacts: logs: paths: @@ -61,5 +61,4 @@ api_updater_test_{{ platform.name }}_{{ editor }}: dependencies: - .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors {% endfor -%} -{% endif -%} {% endfor -%} diff --git a/apiupdaterproject/AGENTS.md b/apiupdaterproject/AGENTS.md index ac4d0670b0..ce1c2ab1b8 100644 --- a/apiupdaterproject/AGENTS.md +++ b/apiupdaterproject/AGENTS.md @@ -13,7 +13,7 @@ what it is and how to run it; this file covers why it is built this way and what `com.unity.netcode.gameobjects/Editor/**`. This project only consumes them. * **Do not "fix" the sources under `Assets/Editor`.** They are deliberately written against the 2.x API and are the input to the test. A helpful cleanup there silently guts it. -* The expected-type list in the run scripts is frozen: it enumerates the public editor API of +* The expected-type list in `run_upgrade_test.py` is frozen: it enumerates the public editor API of `develop-2.0.0`, which is released and cannot change. It only needs extending if a public editor type is relocated again within 3.x. * CI runs it on demand only — comment `/ci apiupdater` on a PR. See `.yamato/api-updater-test.yml`. diff --git a/apiupdaterproject/README.md b/apiupdaterproject/README.md index 3322b00429..f3baef123d 100644 --- a/apiupdaterproject/README.md +++ b/apiupdaterproject/README.md @@ -39,35 +39,28 @@ resolved transport version. ## Running it locally -The script imports the project in batch mode with `-accept-apiupdate`, then asserts that every 2.x -type reference under `Assets/Editor` was rewritten and that none survived. It restores the 2.x -sources when it finishes, so it can be re-run. - -| Option | | -| --- | --- | -| editor path | Omit it if `UNITY_EDITOR_PATH` is set, or if the hub has the version named in `ProjectSettings/ProjectVersion.txt`. | -| keep updated sources | Leaves the rewritten sources in place so `git diff` shows exactly what the updater produced. | -| clean | Purges `Library` and `Temp` first for a cold import. | - -### Windows - -```powershell -.\run-upgrade-test.ps1 -UnityExe "C:\Program Files\Unity\Hub\Editor\\Editor\Unity.exe" -KeepUpdatedSources -Clean -``` - -### macOS - -The editor binary lives inside the `.app` bundle, not next to it. +`run_upgrade_test.py` imports the project in batch mode with `-accept-apiupdate`, then asserts that +every 2.x type reference under `Assets/Editor` was rewritten and that none survived. It restores the +2.x sources when it finishes, so it can be re-run. Windows, macOS and Linux. ```sh -./run-upgrade-test.sh --unity "/Applications/Unity/Hub/Editor//Unity.app/Contents/MacOS/Unity" --keep-updated-sources --clean +python run_upgrade_test.py --unity --clean --keep-updated-sources ``` -### Linux +| Option | | +| --- | --- | +| `--unity` | Omit it if `UNITY_EDITOR_PATH` is set, or if the hub has the version named in `ProjectSettings/ProjectVersion.txt`. | +| `--clean` | Purges `Library` and `Temp` first for a cold import. | +| `--keep-updated-sources` | Leaves the rewritten sources in place so `git diff` shows exactly what the updater produced. | -```sh -./run-upgrade-test.sh --unity "$HOME/Unity/Hub/Editor//Editor/Unity" --keep-updated-sources --clean -``` +Default hub locations, if you need to pass `--unity` explicitly — note that on macOS the binary is +inside the `.app` bundle rather than beside it: + +| | | +| --- | --- | +| Windows | `C:\Program Files\Unity\Hub\Editor\\Editor\Unity.exe` | +| macOS | `/Applications/Unity/Hub/Editor//Unity.app/Contents/MacOS/Unity` | +| Linux | `$HOME/Unity/Hub/Editor//Editor/Unity` | ## How the migration works diff --git a/apiupdaterproject/run-upgrade-test.ps1 b/apiupdaterproject/run-upgrade-test.ps1 deleted file mode 100644 index d6686261f5..0000000000 --- a/apiupdaterproject/run-upgrade-test.ps1 +++ /dev/null @@ -1,173 +0,0 @@ -<# -.SYNOPSIS -Verifies that Unity's obsolete API updater rewrites NGO 2.x editor API references to their -NGO 3.x `Unity.Netcode.GameObjects.Editor` equivalents. - -.DESCRIPTION -Runs the editor over this project in batch mode with -accept-apiupdate, then asserts that every -`Unity.Netcode.Editor` reference under Assets/Editor was rewritten and that no stale reference -survived. The sources are restored afterwards so the test can be re-run, unless -KeepUpdatedSources -is passed (useful for eyeballing exactly what the updater produced). - -.EXAMPLE -.\run-upgrade-test.ps1 -.EXAMPLE -.\run-upgrade-test.ps1 -UnityExe "C:\Program Files\Unity\Hub\Editor\6000.5.3f1\Editor\Unity.exe" -Clean -#> -[CmdletBinding()] -param( - # Editor to run. Defaults to $env:UNITY_EDITOR_PATH, then to the hub install matching - # ProjectSettings/ProjectVersion.txt. - [string]$UnityExe, - - # Delete Library first, so the updater runs against a cold import. - [switch]$Clean, - - # Leave the rewritten sources in place instead of restoring the 2.x originals. - [switch]$KeepUpdatedSources -) - -$ErrorActionPreference = 'Stop' -$projectPath = $PSScriptRoot -$sourceDir = Join-Path $projectPath 'Assets\Editor' -$logFile = Join-Path $projectPath 'upgrade-test.log' - -function Remove-DirectoryRobust { - # Library/PackageCache holds paths past MAX_PATH that Remove-Item cannot delete - and a partial - # delete leaves a project that fails to compile for unrelated reasons. Empty the tree with - # robocopy /MIR first, which is not subject to the limit, then drop the (now shallow) root. - param([string]$Path) - - $empty = Join-Path ([System.IO.Path]::GetTempPath()) ('empty-' + [guid]::NewGuid().ToString('N')) - New-Item -ItemType Directory -Path $empty | Out-Null - try { - # robocopy returns 0-7 for success; anything higher is a real failure. - & robocopy $empty $Path /MIR /NFL /NDL /NJH /NJS /NC /NS /NP | Out-Null - if ($LASTEXITCODE -ge 8) { throw "robocopy failed purging $Path (exit $LASTEXITCODE)" } - Remove-Item -Recurse -Force $Path - } - finally { - Remove-Item -Recurse -Force $empty - } -} - -function Resolve-UnityExe { - param([string]$Explicit) - - if ($Explicit) { - if (-not (Test-Path $Explicit)) { throw "Editor not found: $Explicit" } - return $Explicit - } - if ($env:UNITY_EDITOR_PATH) { - if (-not (Test-Path $env:UNITY_EDITOR_PATH)) { throw "UNITY_EDITOR_PATH does not exist: $($env:UNITY_EDITOR_PATH)" } - return $env:UNITY_EDITOR_PATH - } - - $versionFile = Join-Path $projectPath 'ProjectSettings\ProjectVersion.txt' - $version = (Select-String -Path $versionFile -Pattern '^m_EditorVersion:\s*(.+)$').Matches[0].Groups[1].Value.Trim() - $candidate = "C:\Program Files\Unity\Hub\Editor\$version\Editor\Unity.exe" - if (Test-Path $candidate) { return $candidate } - - throw "No editor found for $version. Pass -UnityExe or set UNITY_EDITOR_PATH." -} - -# Every 2.x type the sources reference, and what the updater is expected to turn it into. -# Frozen: this is the public editor API of develop-2.0.0, which is released and will not change. -# Extend it by hand if a public editor type is ever relocated again within 3.x. -$expected = @( - @{ Old = 'Unity.Netcode.Editor.HiddenScriptEditor'; New = 'Unity.Netcode.GameObjects.Editor.HiddenScriptEditor' } - @{ Old = 'Unity.Netcode.Editor.UnityTransportEditor'; New = 'Unity.Netcode.GameObjects.Editor.UnityTransportEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkAnimatorEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkAnimatorEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkRigidbodyEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkRigidbodyEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkRigidbody2DEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkRigidbody2DEditor' } - @{ Old = 'Unity.Netcode.Editor.NetcodeEditorBase'; New = 'Unity.Netcode.GameObjects.Editor.NetcodeEditorBase' } - @{ Old = 'Unity.Netcode.Editor.NetworkBehaviourEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkBehaviourEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkManagerEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkManagerEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkManagerHelper'; New = 'Unity.Netcode.GameObjects.Editor.NetworkManagerHelper' } - @{ Old = 'Unity.Netcode.Editor.NetworkObjectEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkObjectEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkRigidbodyBaseEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkRigidbodyBaseEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkTransformEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkTransformEditor' } - @{ Old = 'Unity.Netcode.Editor.NetworkPrefabsEditor'; New = 'Unity.Netcode.GameObjects.Editor.NetworkPrefabsEditor' } - @{ Old = 'Unity.Netcode.Editor.Configuration.NetcodeForGameObjectsProjectSettings'; New = 'Unity.Netcode.GameObjects.Editor.Configuration.NetcodeForGameObjectsProjectSettings' } - @{ Old = 'Unity.Netcode.Editor.Configuration.NetworkPrefabProcessor'; New = 'Unity.Netcode.GameObjects.Editor.Configuration.NetworkPrefabProcessor' } -) - -$unity = Resolve-UnityExe -Explicit $UnityExe -Write-Host "Editor: $unity" -Write-Host "Project: $projectPath" - -$backupDir = Join-Path ([System.IO.Path]::GetTempPath()) ("ngo-apiupdater-" + [guid]::NewGuid().ToString('N')) -New-Item -ItemType Directory -Path $backupDir | Out-Null -Copy-Item -Path (Join-Path $sourceDir '*') -Destination $backupDir -Recurse - -try { - if ($Clean) { - foreach ($stale in @('Library', 'Temp')) { - $target = Join-Path $projectPath $stale - if (Test-Path $target) { - Write-Host "Removing $stale ..." - Remove-DirectoryRobust -Path $target - } - } - } - - if (Test-Path $logFile) { Remove-Item -Force $logFile } - - # Start-Process joins -ArgumentList into one command line without quoting the individual values, - # and ProcessStartInfo.ArgumentList does not exist on the .NET Framework that Windows PowerShell - # runs on - so quote the two paths here or a checkout under "C:\Users\Jane Doe\..." splits at the - # space and Unity receives an invalid -projectPath/-logFile. - $unityArgs = @( - '-batchmode', '-nographics', '-quit', - '-accept-apiupdate', - '-ignoreCompilerErrors', - '-burst-disable-compilation', - '-projectPath', "`"$projectPath`"", - '-logFile', "`"$logFile`"" - ) - - Write-Host 'Running the editor (this imports the project and runs the API updater)...' - $process = Start-Process -FilePath $unity -ArgumentList $unityArgs -PassThru -Wait -NoNewWindow - Write-Host "Editor exit code: $($process.ExitCode)" - - $allText = (Get-ChildItem -Path $sourceDir -Filter *.cs | ForEach-Object { Get-Content -Raw $_.FullName }) -join "`n" - - $results = foreach ($entry in $expected) { - # A rewritten reference contains the new name; the old name only ever survives as a distinct - # token, so require at least one new hit and no old hit that is not part of a longer name. - $newHits = ([regex]::Matches($allText, [regex]::Escape($entry.New))).Count - $oldHits = ([regex]::Matches($allText, [regex]::Escape($entry.Old) + '(?![\w.])')).Count - if ($newHits -gt 0 -and $oldHits -eq 0) { $result = 'PASS' } else { $result = 'FAIL' } - [pscustomobject]@{ - Type = $entry.Old - Updated = $newHits - Stale = $oldHits - Result = $result - } - } - - $results | Format-Table -AutoSize - $failures = @($results | Where-Object { $_.Result -eq 'FAIL' }) - - Write-Host '' - if ($failures.Count -eq 0) { - Write-Host "PASS: all $($expected.Count) deprecated editor types were rewritten." -ForegroundColor Green - } - else { - Write-Host "FAIL: $($failures.Count) of $($expected.Count) types were not rewritten. See $logFile" -ForegroundColor Red - } - - if ($KeepUpdatedSources) { - Write-Host "Rewritten sources left in place under Assets/Editor (backup: $backupDir)." - } - - # Explicit, or the exit code falls through to the last native command (robocopy, which reports - # non-zero for ordinary success). - if ($failures.Count -ne 0) { exit 1 } else { exit 0 } -} -finally { - if (-not $KeepUpdatedSources) { - Copy-Item -Path (Join-Path $backupDir '*') -Destination $sourceDir -Recurse -Force - Remove-Item -Recurse -Force $backupDir - } -} diff --git a/apiupdaterproject/run-upgrade-test.sh b/apiupdaterproject/run-upgrade-test.sh deleted file mode 100755 index 1364e9e4c7..0000000000 --- a/apiupdaterproject/run-upgrade-test.sh +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/sh -# Verifies that Unity's API updater rewrites NGO 2.x editor API references to their NGO 3.x -# Unity.Netcode.GameObjects.Editor equivalents. macOS and Linux; see run-upgrade-test.ps1 for Windows. -# -# Runs the editor over this project in batch mode with -accept-apiupdate, then asserts that every -# Unity.Netcode.Editor reference under Assets/Editor was rewritten and that no stale reference -# survived. The 2.x sources are restored on exit so the test can be re-run. -# -# ./run-upgrade-test.sh -# ./run-upgrade-test.sh --unity /Applications/Unity/Hub/Editor/6000.6.0b5/Unity.app/Contents/MacOS/Unity --clean -# -# --unity Editor binary. Defaults to $UNITY_EDITOR_PATH, then to the hub install -# matching ProjectSettings/ProjectVersion.txt. -# --clean Delete Library and Temp first, for a cold import. -# --keep-updated-sources Leave the rewritten sources in place instead of restoring the originals. - -set -eu - -PROJECT_PATH=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) -SOURCE_DIR="$PROJECT_PATH/Assets/Editor" -LOG_FILE="$PROJECT_PATH/upgrade-test.log" - -UNITY_EXE="" -CLEAN=0 -KEEP_UPDATED_SOURCES=0 - -while [ $# -gt 0 ]; do - case "$1" in - --unity) - [ $# -ge 2 ] || { echo "--unity requires a path" >&2; exit 2; } - UNITY_EXE="$2"; shift 2 ;; - --clean) CLEAN=1; shift ;; - --keep-updated-sources) KEEP_UPDATED_SOURCES=1; shift ;; - -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; - *) echo "Unknown argument: $1" >&2; exit 2 ;; - esac -done - -# Every 2.x type the sources reference, and what the updater is expected to turn it into. -# Frozen: this is the public editor API of develop-2.0.0, which is released and will not change. -# Extend it by hand if a public editor type is ever relocated again within 3.x. -EXPECTED_TYPES=" -Unity.Netcode.Editor.HiddenScriptEditor -Unity.Netcode.Editor.UnityTransportEditor -Unity.Netcode.Editor.NetworkAnimatorEditor -Unity.Netcode.Editor.NetworkRigidbodyEditor -Unity.Netcode.Editor.NetworkRigidbody2DEditor -Unity.Netcode.Editor.NetcodeEditorBase -Unity.Netcode.Editor.NetworkBehaviourEditor -Unity.Netcode.Editor.NetworkManagerEditor -Unity.Netcode.Editor.NetworkManagerHelper -Unity.Netcode.Editor.NetworkObjectEditor -Unity.Netcode.Editor.NetworkRigidbodyBaseEditor -Unity.Netcode.Editor.NetworkTransformEditor -Unity.Netcode.Editor.NetworkPrefabsEditor -Unity.Netcode.Editor.Configuration.NetcodeForGameObjectsProjectSettings -Unity.Netcode.Editor.Configuration.NetworkPrefabProcessor -" - -resolve_unity() { - if [ -n "$UNITY_EXE" ]; then - [ -x "$UNITY_EXE" ] || { echo "Editor not found or not executable: $UNITY_EXE" >&2; exit 1; } - echo "$UNITY_EXE"; return - fi - if [ -n "${UNITY_EDITOR_PATH:-}" ]; then - [ -x "$UNITY_EDITOR_PATH" ] || { echo "UNITY_EDITOR_PATH is not executable: $UNITY_EDITOR_PATH" >&2; exit 1; } - echo "$UNITY_EDITOR_PATH"; return - fi - - version=$(sed -n 's/^m_EditorVersion:[[:space:]]*\(.*\)$/\1/p' \ - "$PROJECT_PATH/ProjectSettings/ProjectVersion.txt" | tr -d '\r' | head -n 1) - [ -n "$version" ] || { echo "Could not read m_EditorVersion from ProjectSettings/ProjectVersion.txt" >&2; exit 1; } - - # Default hub locations differ per platform, and the macOS editor lives inside the .app bundle. - case "$(uname -s)" in - Darwin) candidate="/Applications/Unity/Hub/Editor/$version/Unity.app/Contents/MacOS/Unity" ;; - *) candidate="$HOME/Unity/Hub/Editor/$version/Editor/Unity" ;; - esac - [ -x "$candidate" ] && { echo "$candidate"; return; } - - echo "No editor found for $version at $candidate. Pass --unity or set UNITY_EDITOR_PATH." >&2 - exit 1 -} - -UNITY=$(resolve_unity) -echo "Editor: $UNITY" -echo "Project: $PROJECT_PATH" - -BACKUP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/ngo-apiupdater-XXXXXX") -cp -R "$SOURCE_DIR/." "$BACKUP_DIR/" - -# Restore on any exit path, so an interrupted run does not leave rewritten sources behind. -# Guarded: trapping both EXIT and INT/TERM means this can be entered twice. -CLEANED=0 -cleanup() { - [ "$CLEANED" -eq 0 ] || return 0 - CLEANED=1 - if [ "$KEEP_UPDATED_SOURCES" -eq 0 ]; then - cp -R "$BACKUP_DIR/." "$SOURCE_DIR/" - rm -rf "$BACKUP_DIR" - fi -} -trap cleanup EXIT INT TERM - -if [ "$CLEAN" -eq 1 ]; then - for stale in Library Temp; do - if [ -d "$PROJECT_PATH/$stale" ]; then - echo "Removing $stale ..." - rm -rf "$PROJECT_PATH/$stale" - fi - done -fi - -rm -f "$LOG_FILE" - -echo "Running the editor (this imports the project and runs the API updater)..." -# The editor returns non-zero when compilation fails, which is the normal state before the updater -# rewrites the sources, so do not let set -e abort here. -EDITOR_STATUS=0 -"$UNITY" \ - -batchmode -nographics -quit \ - -accept-apiupdate \ - -ignoreCompilerErrors \ - -burst-disable-compilation \ - -projectPath "$PROJECT_PATH" \ - -logFile "$LOG_FILE" || EDITOR_STATUS=$? -echo "Editor exit code: $EDITOR_STATUS" - -ALL_TEXT=$(cat "$SOURCE_DIR"/*.cs) - -TOTAL=0 -FAILURES=0 -printf '\n%-72s %8s %6s %s\n' "TYPE" "UPDATED" "STALE" "RESULT" -for old in $EXPECTED_TYPES; do - TOTAL=$((TOTAL + 1)) - new="Unity.Netcode.GameObjects.${old#Unity.Netcode.}" - - updated=$(printf '%s' "$ALL_TEXT" | grep -o -F "$new" | wc -l | tr -d ' ') - # The old name only ever survives as a distinct token; a trailing word char or dot means it is - # really part of the longer new name, so exclude those. - stale=$(printf '%s' "$ALL_TEXT" | grep -oE "$(printf '%s' "$old" | sed 's/\./\\./g')([^A-Za-z0-9_.]|$)" | wc -l | tr -d ' ') - - if [ "$updated" -gt 0 ] && [ "$stale" -eq 0 ]; then - result="PASS" - else - result="FAIL" - FAILURES=$((FAILURES + 1)) - fi - printf '%-72s %8s %6s %s\n' "$old" "$updated" "$stale" "$result" -done - -echo "" -if [ "$FAILURES" -eq 0 ]; then - echo "PASS: all $TOTAL deprecated editor types were rewritten." -else - echo "FAIL: $FAILURES of $TOTAL types were not rewritten. See $LOG_FILE" -fi - -if [ "$KEEP_UPDATED_SOURCES" -eq 1 ]; then - echo "Rewritten sources left in place under Assets/Editor (backup: $BACKUP_DIR)." -fi - -[ "$FAILURES" -eq 0 ] || exit 1 -exit 0 diff --git a/apiupdaterproject/run_upgrade_test.py b/apiupdaterproject/run_upgrade_test.py new file mode 100644 index 0000000000..4aa839fd35 --- /dev/null +++ b/apiupdaterproject/run_upgrade_test.py @@ -0,0 +1,224 @@ +#!/usr/bin/env python3 +""" +Verifies that Unity's API updater rewrites NGO 2.x editor API references to their NGO 3.x +Unity.Netcode.GameObjects.Editor equivalents. Runs on Windows, macOS and Linux. + +Imports the project in batch mode with -accept-apiupdate, then asserts that every +Unity.Netcode.Editor reference under Assets/Editor was rewritten and that no stale reference +survived. The 2.x sources are restored on exit so the test can be re-run. + +Note that this script can be run from anywhere; paths are resolved relative to the script itself. +""" + +import argparse +import os +import platform +import re +import shutil +import subprocess +import sys +import tempfile + +PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) +SOURCE_DIR = os.path.join(PROJECT_PATH, 'Assets', 'Editor') +LOG_FILE = os.path.join(PROJECT_PATH, 'upgrade-test.log') + +# Every 2.x type the sources reference. The 3.x name is derived, so the pair cannot drift. +# Frozen: this is the public editor API of develop-2.0.0, which is released and will not change. +# Extend it by hand if a public editor type is ever relocated again within 3.x. +EXPECTED_TYPES = [ + 'Unity.Netcode.Editor.HiddenScriptEditor', + 'Unity.Netcode.Editor.UnityTransportEditor', + 'Unity.Netcode.Editor.NetworkAnimatorEditor', + 'Unity.Netcode.Editor.NetworkRigidbodyEditor', + 'Unity.Netcode.Editor.NetworkRigidbody2DEditor', + 'Unity.Netcode.Editor.NetcodeEditorBase', + 'Unity.Netcode.Editor.NetworkBehaviourEditor', + 'Unity.Netcode.Editor.NetworkManagerEditor', + 'Unity.Netcode.Editor.NetworkManagerHelper', + 'Unity.Netcode.Editor.NetworkObjectEditor', + 'Unity.Netcode.Editor.NetworkRigidbodyBaseEditor', + 'Unity.Netcode.Editor.NetworkTransformEditor', + 'Unity.Netcode.Editor.NetworkPrefabsEditor', + 'Unity.Netcode.Editor.Configuration.NetcodeForGameObjectsProjectSettings', + 'Unity.Netcode.Editor.Configuration.NetworkPrefabProcessor', +] + + +def resolve_unity(explicit): + """ + Returns the editor binary to run: the explicit path, else UNITY_EDITOR_PATH, else the default hub + install matching ProjectSettings/ProjectVersion.txt. + """ + if explicit: + if not os.path.exists(explicit): + sys.exit(f"Editor not found: {explicit}") + return explicit + + from_env = os.environ.get('UNITY_EDITOR_PATH') + if from_env: + if not os.path.exists(from_env): + sys.exit(f"UNITY_EDITOR_PATH does not exist: {from_env}") + return from_env + + version_file = os.path.join(PROJECT_PATH, 'ProjectSettings', 'ProjectVersion.txt') + version = None + with open(version_file, encoding='utf-8-sig') as handle: + for line in handle: + match = re.match(r'^m_EditorVersion:\s*(\S+)', line) + if match: + version = match.group(1) + break + if not version: + sys.exit(f"Could not read m_EditorVersion from {version_file}") + + # Default hub locations differ per platform; on macOS the binary is inside the .app bundle. + system = platform.system() + if system == 'Darwin': + candidate = f"/Applications/Unity/Hub/Editor/{version}/Unity.app/Contents/MacOS/Unity" + elif system == 'Windows': + candidate = f"C:\\Program Files\\Unity\\Hub\\Editor\\{version}\\Editor\\Unity.exe" + else: + candidate = os.path.join(os.path.expanduser('~'), 'Unity', 'Hub', 'Editor', version, 'Editor', 'Unity') + + if os.path.exists(candidate): + return candidate + sys.exit(f"No editor found for {version} at {candidate}. Pass --unity or set UNITY_EDITOR_PATH.") + + +def purge_tree(path): + """ + Deletes a directory tree, including one containing paths past MAX_PATH. + + Library/PackageCache holds paths the Win32 file APIs cannot delete, and a partial delete is worse + than none: it leaves a project that fails to compile for unrelated reasons. On Windows, empty the + tree with robocopy first, which is not subject to the limit, then drop the shallow remainder. + """ + if not os.path.isdir(path): + return + + if platform.system() == 'Windows': + empty = tempfile.mkdtemp(prefix='ngo-empty-') + try: + # robocopy exits 0-7 for success; 8 and above is a real failure. + result = subprocess.run( + ['robocopy', empty, path, '/MIR', '/NFL', '/NDL', '/NJH', '/NJS', '/NC', '/NS', '/NP'], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=False) + if result.returncode >= 8: + sys.exit(f"robocopy failed purging {path} (exit {result.returncode})") + finally: + shutil.rmtree(empty, ignore_errors=True) + + shutil.rmtree(path) + + +def copy_flat(from_dir, to_dir): + """Copies the files of a flat directory. Assets/Editor has no subdirectories.""" + os.makedirs(to_dir, exist_ok=True) + for entry in os.listdir(from_dir): + source = os.path.join(from_dir, entry) + if os.path.isfile(source): + shutil.copy2(source, os.path.join(to_dir, entry)) + + +def read_sources(): + """Returns the concatenated text of every .cs file under Assets/Editor.""" + parts = [] + for entry in sorted(os.listdir(SOURCE_DIR)): + if entry.endswith('.cs'): + with open(os.path.join(SOURCE_DIR, entry), encoding='utf-8-sig') as handle: + parts.append(handle.read()) + return '\n'.join(parts) + + +def run_editor(unity): + """Imports the project in batch mode with the API updater enabled.""" + if os.path.exists(LOG_FILE): + os.remove(LOG_FILE) + + print('Running the editor (this imports the project and runs the API updater)...') + # List form, so paths containing spaces are passed as single arguments with no quoting of our own. + result = subprocess.run([ + unity, + '-batchmode', '-nographics', '-quit', + '-accept-apiupdate', + '-ignoreCompilerErrors', + '-burst-disable-compilation', + '-projectPath', PROJECT_PATH, + '-logFile', LOG_FILE, + ], check=False) + print(f"Editor exit code: {result.returncode}") + + +def assert_rewritten(): + """Prints a per-type result table and returns the number of types that were not rewritten.""" + all_text = read_sources() + + failures = 0 + print(f"\n{'TYPE':<72} {'UPDATED':>8} {'STALE':>6} RESULT") + for old in EXPECTED_TYPES: + new = old.replace('Unity.Netcode.', 'Unity.Netcode.GameObjects.', 1) + + updated = len(re.findall(re.escape(new), all_text)) + # The old name survives only as a distinct token: a trailing word character or dot means this + # is really part of the longer new name. + stale = len(re.findall(re.escape(old) + r'(?![\w.])', all_text)) + + passed = updated > 0 and stale == 0 + if not passed: + failures += 1 + print(f"{old:<72} {updated:>8} {stale:>6} {'PASS' if passed else 'FAIL'}") + + return failures + + +def main(): + parser = argparse.ArgumentParser( + description="Verifies that Unity's API updater migrates NGO 2.x editor API references to 3.x.") + parser.add_argument('--unity', default='', + help='Editor binary. Defaults to UNITY_EDITOR_PATH, then to the hub install ' + 'matching ProjectSettings/ProjectVersion.txt.') + parser.add_argument('--clean', action='store_true', + help='Delete Library and Temp first, for a cold import.') + parser.add_argument('--keep-updated-sources', action='store_true', + help='Leave the rewritten sources in place instead of restoring the originals.') + args = parser.parse_args() + + unity = resolve_unity(args.unity) + print(f"Editor: {unity}") + print(f"Project: {PROJECT_PATH}") + + backup_dir = tempfile.mkdtemp(prefix='ngo-apiupdater-') + copy_flat(SOURCE_DIR, backup_dir) + + try: + if args.clean: + for stale in ('Library', 'Temp'): + target = os.path.join(PROJECT_PATH, stale) + if os.path.isdir(target): + print(f"Removing {stale} ...") + purge_tree(target) + + run_editor(unity) + failures = assert_rewritten() + + print('') + if failures == 0: + print(f"PASS: all {len(EXPECTED_TYPES)} deprecated editor types were rewritten.") + else: + print(f"FAIL: {failures} of {len(EXPECTED_TYPES)} types were not rewritten. See {LOG_FILE}") + + if args.keep_updated_sources: + print(f"Rewritten sources left in place under Assets/Editor (backup: {backup_dir}).") + + return 0 if failures == 0 else 1 + finally: + # Restore on every exit path, including Ctrl-C, so an interrupted run never leaves the + # rewritten sources behind as the next run's input. + if not args.keep_updated_sources: + copy_flat(backup_dir, SOURCE_DIR) + shutil.rmtree(backup_dir, ignore_errors=True) + + +if __name__ == '__main__': + sys.exit(main()) From 29e2c03d6b713b8de7d7c9b1d93e0a76207ff08a Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 17:36:42 -0500 Subject: [PATCH 09/12] fix Fixing issue with path --- .yamato/api-updater-test.yml | 2 +- apiupdaterproject/run_upgrade_test.py | 41 +++++++++++++++++++++------ 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/.yamato/api-updater-test.yml b/.yamato/api-updater-test.yml index 4d037feef7..4bb99ae426 100644 --- a/.yamato/api-updater-test.yml +++ b/.yamato/api-updater-test.yml @@ -53,7 +53,7 @@ api_updater_test_{{ platform.name }}_{{ editor }}: flavor: {{ platform.flavor }} commands: - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for the import - - python apiupdaterproject/run_upgrade_test.py --unity .Editor/Editor/Unity --clean + - python apiupdaterproject/run_upgrade_test.py --unity .Editor --clean artifacts: logs: paths: diff --git a/apiupdaterproject/run_upgrade_test.py b/apiupdaterproject/run_upgrade_test.py index 4aa839fd35..ab5d33b0f0 100644 --- a/apiupdaterproject/run_upgrade_test.py +++ b/apiupdaterproject/run_upgrade_test.py @@ -45,21 +45,45 @@ ] +def find_editor_binary(path): + """ + Accepts either the editor binary itself or an install root, and returns the binary. + + Layouts differ: unity-downloader-cli puts the Linux binary at /Unity, the Hub puts it at + /Editor/Unity, and on macOS it is inside the .app bundle. Taking a root and searching means + a caller never has to know which one they have. + """ + if os.path.isfile(path): + return path + if not os.path.isdir(path): + return None + + for relative in ('Unity', 'Unity.exe', + os.path.join('Editor', 'Unity'), os.path.join('Editor', 'Unity.exe'), + os.path.join('Unity.app', 'Contents', 'MacOS', 'Unity')): + candidate = os.path.join(path, relative) + if os.path.isfile(candidate): + return candidate + return None + + def resolve_unity(explicit): """ Returns the editor binary to run: the explicit path, else UNITY_EDITOR_PATH, else the default hub - install matching ProjectSettings/ProjectVersion.txt. + install matching ProjectSettings/ProjectVersion.txt. Each may name a binary or an install root. """ if explicit: - if not os.path.exists(explicit): + found = find_editor_binary(explicit) + if not found: sys.exit(f"Editor not found: {explicit}") - return explicit + return found from_env = os.environ.get('UNITY_EDITOR_PATH') if from_env: - if not os.path.exists(from_env): - sys.exit(f"UNITY_EDITOR_PATH does not exist: {from_env}") - return from_env + found = find_editor_binary(from_env) + if not found: + sys.exit(f"UNITY_EDITOR_PATH does not name an editor: {from_env}") + return found version_file = os.path.join(PROJECT_PATH, 'ProjectSettings', 'ProjectVersion.txt') version = None @@ -81,8 +105,9 @@ def resolve_unity(explicit): else: candidate = os.path.join(os.path.expanduser('~'), 'Unity', 'Hub', 'Editor', version, 'Editor', 'Unity') - if os.path.exists(candidate): - return candidate + found = find_editor_binary(candidate) + if found: + return found sys.exit(f"No editor found for {version} at {candidate}. Pass --unity or set UNITY_EDITOR_PATH.") From a08449bf56bdfb428c51c2bd6a8f8c5497d4259d Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 17:58:56 -0500 Subject: [PATCH 10/12] fix Project version correction. Removal of 600.7.0a5 injected assemblies. Updating agent knowledge. --- apiupdaterproject/AGENTS.md | 5 +++++ apiupdaterproject/Packages/manifest.json | 3 +-- apiupdaterproject/ProjectSettings/ProjectVersion.txt | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apiupdaterproject/AGENTS.md b/apiupdaterproject/AGENTS.md index ce1c2ab1b8..e1d405fbd4 100644 --- a/apiupdaterproject/AGENTS.md +++ b/apiupdaterproject/AGENTS.md @@ -17,6 +17,11 @@ what it is and how to run it; this file covers why it is built this way and what `develop-2.0.0`, which is released and cannot change. It only needs extending if a public editor type is relocated again within 3.x. * CI runs it on demand only — comment `/ci apiupdater` on a PR. See `.yamato/api-updater-test.yml`. +* **Opening this project locally mutates it.** Unity rewrites `ProjectVersion.txt` to whatever editor + opened it, and the package manager can add builtin modules to `Packages/manifest.json` that only + exist in that editor — `com.unity.modules.smartstrings` from a 6000.7 alpha broke the 6000.6 CI job + exactly this way. Check `git diff` on those two files before committing, and keep the manifest to + modules that exist in the editor the job downloads (`validation_editors.default`). * Verified beyond this project: a real sample project upgraded 7 of its own scripts automatically, including a `NetcodeEditorBase` subclass. diff --git a/apiupdaterproject/Packages/manifest.json b/apiupdaterproject/Packages/manifest.json index b50ba6c341..02745e59f3 100644 --- a/apiupdaterproject/Packages/manifest.json +++ b/apiupdaterproject/Packages/manifest.json @@ -4,7 +4,6 @@ "com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects", "com.unity.modules.animation": "1.0.0", "com.unity.modules.physics": "1.0.0", - "com.unity.modules.physics2d": "1.0.0", - "com.unity.modules.smartstrings": "1.0.0" + "com.unity.modules.physics2d": "1.0.0" } } diff --git a/apiupdaterproject/ProjectSettings/ProjectVersion.txt b/apiupdaterproject/ProjectSettings/ProjectVersion.txt index 05b85b7612..02866a2258 100644 --- a/apiupdaterproject/ProjectSettings/ProjectVersion.txt +++ b/apiupdaterproject/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 6000.7.0a5 -m_EditorVersionWithRevision: 6000.7.0a5 (a15235a53881) +m_EditorVersion: 6000.6.0b5 +m_EditorVersionWithRevision: 6000.6.0b5 (b5238eaafb35) From 341cf6630ceb873bbf1778aae57b5682675aeac7 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 19:26:37 -0500 Subject: [PATCH 11/12] style Clearing out some of the verbosity. --- .yamato/_run-all.yml | 1 - .yamato/_triggers.yml | 11 +------- .yamato/api-updater-test.yml | 25 +------------------ .../Assets/Editor/DeprecatedApiUsage.cs | 7 +++--- .../Editor/DeprecatedApiUsageQualified.cs | 7 +++--- 5 files changed, 8 insertions(+), 43 deletions(-) diff --git a/.yamato/_run-all.yml b/.yamato/_run-all.yml index ee3389ec67..dd15f9b857 100644 --- a/.yamato/_run-all.yml +++ b/.yamato/_run-all.yml @@ -447,7 +447,6 @@ run_all_project_tests_cmb_service_default: # Runs the NGO 2.x -> 3.x editor script upgrade validation (see api-updater-test.yml) -# Manual only today. Add this to develop_nightly or develop_weekly_trunk in _triggers.yml to schedule it. run_all_api_updater_tests: name: Run All API Updater Tests dependencies: diff --git a/.yamato/_triggers.yml b/.yamato/_triggers.yml index be99b77d34..2ed90b16ee 100644 --- a/.yamato/_triggers.yml +++ b/.yamato/_triggers.yml @@ -116,11 +116,6 @@ pr_code_changes_checks: cancel_old_ci: true - - - - - # Unified (NGO + N4E) validation, on demand. # This job allows the Unified tests to be kicked off by commenting "/ci unified". # This is useful for PRs where pr_code_changes_checks doesn't trigger. @@ -134,12 +129,8 @@ unified_pr_checks: cancel_old_ci: true -# NGO 2.x -> 3.x editor script upgrade validation, on demand. +# NGO 2.x -> 3.x on demand editor script upgrade validation. # This job allows the API updater test to be kicked off by commenting "/ci apiupdater". -# It is deliberately not part of the PR gate: what it protects only changes when a public editor type -# is added, moved or removed, so paying a full editor import on every PR is not worth it. -# To put it on a schedule, add .yamato/_run-all.yml#run_all_api_updater_tests to develop_nightly or -# develop_weekly_trunk below. api_updater_pr_checks: name: API Updater checks [on demand] dependencies: diff --git a/.yamato/api-updater-test.yml b/.yamato/api-updater-test.yml index 4bb99ae426..8662e698cc 100644 --- a/.yamato/api-updater-test.yml +++ b/.yamato/api-updater-test.yml @@ -1,4 +1,4 @@ -{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. +{% metadata_file .yamato/project.metafile %} --- # DESCRIPTION-------------------------------------------------------------------------- @@ -10,20 +10,6 @@ # -accept-apiupdate and asserts that every 2.x type reference was rewritten and none survived. # See apiupdaterproject/README.md. -# WHY THIS JOB IS MANUAL ONLY----------------------------------------------------------- - # It is deliberately not wired into pr_minimal_required_checks or pr_code_changes_checks. The thing - # it protects only changes when a public editor type is added, moved or removed, so paying a full - # editor import on every PR is not worth it. Kick it off with "/ci apiupdater" in a PR comment - # (see api_updater_pr_checks in _triggers.yml), or from the Yamato UI. - # If it should also run on a schedule, add .yamato/_run-all.yml#run_all_api_updater_tests to - # develop_nightly or develop_weekly_trunk in _triggers.yml. - -# CONFIGURATION STRUCTURE-------------------------------------------------------------- - # Runs on the default platform (Ubuntu) like every other basic job. run_upgrade_test.py is Python, so - # there is no platform constraint - the earlier PowerShell version forced a Windows agent because it - # needed robocopy to purge Library past MAX_PATH. - # A single editor is enough - the job is asserting on the editor's API updater, not on NGO - # behaviour across editor versions. Widen to validation_editors.all if that stops being true. # TECHNICAL CONSIDERATIONS--------------------------------------------------------------- # apiupdaterproject/Packages/manifest.json references the package by relative path @@ -34,15 +20,6 @@ # --clean purges Library first: the assertion is meaningless against a warm Library that already # holds rewritten sources from a previous run. -# QUALITY CONSIDERATIONS-------------------------------------------------------------------- - # The expected type list in run_upgrade_test.py is inline and hand-written. That is fine because - # its input is frozen: it enumerates the 2.x public editor API, and develop-2.0.0 is released. - # TODO: the list does not extend itself. A later relocation within 3.x, or a back port into 2.x, - # has to be added by hand or this job silently stops covering it. Deriving the list from the - # [MovedFrom] attributes in the package source would close that. - -#------------------------------------------------------------------------------------ - {% for platform in test_platforms.default -%} {% for editor in validation_editors.default -%} api_updater_test_{{ platform.name }}_{{ editor }}: diff --git a/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs b/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs index bb02a4e7f3..ae152393f3 100644 --- a/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs +++ b/apiupdaterproject/Assets/Editor/DeprecatedApiUsage.cs @@ -1,7 +1,6 @@ -// NGO 2.x-era editor code. Every type reference below must be rewritten by Unity's API updater to -// its `Unity.Netcode.GameObjects.Editor` equivalent. Do not "fix" this file - it is the input to -// the upgrade test. See ../../README.md. -#pragma warning disable 169 // field is never used +// Update only if new public editor API is added to NGO v2.x.x. +// It is used to validate the upgrade test. See ../../README.md. +#pragma warning disable 169 // Ignore field is never used warnings using ApiUpdaterProject; using Unity.Netcode.Editor; diff --git a/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs b/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs index 79fa1b41bd..4917e3ab02 100644 --- a/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs +++ b/apiupdaterproject/Assets/Editor/DeprecatedApiUsageQualified.cs @@ -1,7 +1,6 @@ -// The same 2.x API reached through the reference forms the updater has to handle separately from a -// plain `using` + simple name: fully qualified names, a namespace alias, a type alias, a base type -// and a typeof. Do not "fix" this file - it is the input to the upgrade test. -#pragma warning disable 169 // field is never used +// Update only if new public editor API is added to NGO v2.x.x. +// It is used to validate the upgrade test. See ../../README.md. +#pragma warning disable 169 // Ignore field is never used warnings using System; using Cfg = Unity.Netcode.Editor.Configuration; From 1876ee64813c418bc984fdfac557b548005085a5 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Tue, 25 Aug 2026 19:31:03 -0500 Subject: [PATCH 12/12] style removing conflicting text. --- apiupdaterproject/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/apiupdaterproject/README.md b/apiupdaterproject/README.md index f3baef123d..6fa786b521 100644 --- a/apiupdaterproject/README.md +++ b/apiupdaterproject/README.md @@ -34,8 +34,6 @@ auto-referencing assembly like `Assembly-CSharp-Editor` CS0433-ambiguous. The ty incidental to what is being measured, so a local `MonoBehaviour` keeps the test independent of the resolved transport version. -**Do not "fix" the sources under `Assets/Editor`.** They are deliberately written against the 2.x API -— they are the input to the test. ## Running it locally