Skip to content

Commit f9f721a

Browse files
refactor
Making sure we still have the NetworkManager.__rpc_name_table as that has become part of the public API.
1 parent d18cf06 commit f9f721a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

com.unity.netcode.gameobjects/Editor/CodeGen/RuntimeAccessModifiersILPP.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,11 @@ private void ProcessNetworkManager(TypeDefinition typeDefinition, string[] assem
106106
{
107107
fieldDefinition.IsPublic = true;
108108
}
109-
#if MULTIPLAYER_TOOLS && (DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE)
109+
110110
if (fieldDefinition.Name == nameof(NetworkManager.__rpc_name_table))
111111
{
112112
fieldDefinition.IsPublic = true;
113113
}
114-
#endif
115114
}
116115

117116
foreach (var nestedTypeDefinition in typeDefinition.NestedTypes)

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ public class NetworkManager : MonoBehaviour, INetworkUpdateSystem
4949
// RuntimeAccessModifiersILPP will make this `public`
5050
internal static readonly Dictionary<uint, RpcReceiveHandler> __rpc_func_table = new Dictionary<uint, RpcReceiveHandler>();
5151

52-
#if MULTIPLAYER_TOOLS && (DEVELOPMENT_BUILD || UNITY_EDITOR || UNITY_MP_TOOLS_NET_STATS_MONITOR_ENABLED_IN_RELEASE)
53-
// RuntimeAccessModifiersILPP will make this `public`
52+
// RuntimeAccessModifiersILPP will make this `public` (legacy table should be removed in v3.x.x)
5453
internal static readonly Dictionary<uint, string> __rpc_name_table = new Dictionary<uint, string>();
55-
#endif
5654

5755
#pragma warning restore IDE1006 // restore naming rule violation check
5856

0 commit comments

Comments
 (0)