You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Documentation~/upgrade-guide.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Upgrade from 2.x to 3.x
2
2
3
-
Update your project for the Unity Editor, dependency, and API changes that Netcode for GameObjects 3.x introduces.
3
+
Update your project for the Unity Editor, assembly definition, dependency, and API changes that Netcode for GameObjects 3.x introduces.
4
4
5
-
Version 3.x of Netcode for GameObjects raises the minimum Unity Editor version and adds a dependency on Netcode for Entities. It also renames the Editor assembly definitions and turns several obsolete API warnings into compile errors. Refer to the following sections for the changes that affect your project and the steps to take for each one.
5
+
Version 3.x of Netcode for GameObjects raises the minimum Unity Editor version, renames the Editor assembly definitions, and turns several obsolete API warnings into compile errors. Refer to the following sections for the changes that affect your project and the steps to take for each one.
6
6
7
7
> [!WARNING]
8
8
> The API updater modifies your files in place. Commit or back up your work before you update your project.
@@ -21,7 +21,7 @@ Version 3.x depends on the Netcode for Entities package (`com.unity.netcode`), w
21
21
To upgrade an existing project from version 2.x to version 3.x, follow these steps:
22
22
23
23
1. Back up your project, or commit your work to source control.
24
-
1. Upgrade your project to Unity Editor version 6000.7 or later.
24
+
1. Upgrade your project to Unity Editor version 6.7 or later.
25
25
1. From the Unity Editor, select **Window** > **Package Manager**.
26
26
1. From the **Package Manager** window, select **Netcode for GameObjects** in the list of packages.
27
27
1. Select version 3.x, then select **Update**.
@@ -44,7 +44,7 @@ Version 3.x renames the Editor assembly definitions to the `Unity.Netcode.GameOb
If your own Editor assemblies reference any of these assembly definitions by name, update the reference to the new name. The API updater migrates references to the moved Editor namespace types for you.
@@ -65,11 +65,29 @@ Replace each of the following APIs with its listed replacement:
The `RequireOwnership` field applies to `ServerRpc` and the other remote procedure call (RPC) attributes. Use `InvokePermission` in its place. For more information, refer to [RPCs](advanced-topics/message-system/rpc.md).
72
71
72
+
### Replace command-line argument lookups
73
+
74
+
Version 3.x raises a compile error for both `CommandLineOptions.Instance` and the `CommandLineOptions.GetArg` instance method, so a typical `Instance.GetArg` call needs a full rewrite rather than a rename. Use the static `CommandLineOptions.TryGetArg` method, which reports whether it found the argument and returns the value through an `out` parameter:
0 commit comments