From eb4c894f2189ec6903dd4d81f9d5ca20be0b99eb Mon Sep 17 00:00:00 2001 From: "M. Fatih MAR" Date: Wed, 4 Aug 2021 23:34:09 +0100 Subject: [PATCH 1/3] chore: replace MLAPI with Netcode in C# source files --- .../Editor/CodeGen/RuntimeAccessModifiersILPP.cs | 4 ++-- .../Editor/NetcodeProfilerModule.cs | 13 +++++++------ .../Editor/NetworkManagerEditor.cs | 2 +- .../Prototyping/NetworkAnimator.cs | 2 +- .../Prototyping/NetworkNavMeshAgent.cs | 2 +- .../Prototyping/NetworkTransform.cs | 2 +- .../Runtime/Configuration/NetworkConfig.cs | 8 ++++---- .../Runtime/Configuration/NetworkConstants.cs | 2 +- .../Runtime/Core/NetworkManager.cs | 6 +++--- .../Runtime/Core/NetworkObject.cs | 10 +++++----- .../Runtime/Core/SnapshotSystem.cs | 2 +- .../Runtime/Logging/NetworkLog.cs | 14 +++++++------- .../Runtime/SceneManagement/NetworkSceneManager.cs | 2 +- .../Runtime/Serialization/SerializationManager.cs | 2 +- .../Transports/MultiplexTransportAdapter.cs | 2 +- .../Transports/Tests/Editor/TransportTest.cs | 4 ++-- .../Runtime/Transports/TransportChannel.cs | 2 +- .../Runtime/Transports/UNET/RelayTransport.cs | 2 +- .../Runtime/Transports/UNET/UNetChannel.cs | 2 +- .../Runtime/Transports/UNET/UNetTransport.cs | 4 ++-- .../NetworkManagerCustomMessageManagerTests.cs | 2 +- .../Editor/NetworkManagerMessageHandlerTests.cs | 2 +- .../Editor/NetworkManagerSceneManagerTests.cs | 2 +- .../Tests/Editor/NetworkObjectTests.cs | 10 +++++----- .../Tests/Runtime/Helpers/NetworkManagerHelper.cs | 4 ++-- .../Tests/Runtime/RpcQueueTests.cs | 2 +- .../Tests/Runtime/Transport/SIPTransport.cs | 6 +++--- testproject/Assets/Scripts/CommandLineHandler.cs | 12 ++++++------ testproject/Assets/Scripts/ConnectionModeScript.cs | 6 +++--- .../Assets/Scripts/MenuManagement/MenuReference.cs | 8 ++++---- .../Scripts/MenuManagement/SceneReference.cs | 6 +++--- testproject/Assets/Scripts/SyncTransform.cs | 2 +- .../Manual/HybridScripts/RpcQueueManualTests.cs | 2 +- .../Assets/Tests/Manual/Scripts/BandwidthTest.cs | 2 +- .../Scripts/NetworkSceneManagerCallbackTests.cs | 2 +- .../Helpers/BuildMultiprocessTestPlayer.cs | 2 +- .../Runtime/MultiprocessRuntime/TestCoordinator.cs | 4 ++-- 37 files changed, 81 insertions(+), 80 deletions(-) diff --git a/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs b/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs index 4a1b86f51a..8281fa8c18 100644 --- a/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs +++ b/com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs @@ -29,7 +29,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly) var assemblyDefinition = CodeGenHelpers.AssemblyDefinitionFor(compiledAssembly); if (assemblyDefinition == null) { - m_Diagnostics.AddError($"Cannot read MLAPI Runtime assembly definition: {compiledAssembly.Name}"); + m_Diagnostics.AddError($"Cannot read Netcode Runtime assembly definition: {compiledAssembly.Name}"); return null; } @@ -60,7 +60,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly) } else { - m_Diagnostics.AddError($"Cannot get main module from MLAPI Runtime assembly definition: {compiledAssembly.Name}"); + m_Diagnostics.AddError($"Cannot get main module from Netcode Runtime assembly definition: {compiledAssembly.Name}"); } // write diff --git a/com.unity.multiplayer.mlapi/Editor/NetcodeProfilerModule.cs b/com.unity.multiplayer.mlapi/Editor/NetcodeProfilerModule.cs index 98c35eff62..953236656c 100644 --- a/com.unity.multiplayer.mlapi/Editor/NetcodeProfilerModule.cs +++ b/com.unity.multiplayer.mlapi/Editor/NetcodeProfilerModule.cs @@ -10,9 +10,9 @@ namespace Unity.Netcode.Editor internal static class NetcodeProfilerModule { #if UNITY_2020_2_OR_NEWER && ENABLE_PROFILER - private const string k_RpcModuleName = "MLAPI RPCs"; - private const string k_OperationModuleName = "MLAPI Operations"; - private const string k_MessageModuleName = "MLAPI Messages"; + private const string k_RpcModuleName = "Netcode RPCs"; + private const string k_OperationModuleName = "Netcode Operations"; + private const string k_MessageModuleName = "Netcode Messages"; #pragma warning disable IDE1006 // disable naming rule violation check /// @@ -75,9 +75,9 @@ private class NetcodeModules private delegate List CounterListFactoryDelegate(); - private static bool CreateNetcodeDynamicModule(ref NetcodeModules mlapiModules, string moduleName, CounterListFactoryDelegate counterListFactoryDelegate) + private static bool CreateNetcodeDynamicModule(ref NetcodeModules netcodeModules, string moduleName, CounterListFactoryDelegate counterListFactoryDelegate) { - var module = mlapiModules.m_Modules.Find(x => x.m_Name == moduleName); + var module = netcodeModules.m_Modules.Find(x => x.m_Name == moduleName); if (module == null) { var newModule = new NetcodeProfilerModuleData @@ -86,7 +86,8 @@ private static bool CreateNetcodeDynamicModule(ref NetcodeModules mlapiModules, m_ChartCounters = counterListFactoryDelegate(), m_DetailCounters = counterListFactoryDelegate(), }; - mlapiModules.m_Modules.Add(newModule); + netcodeModules.m_Modules.Add(newModule); + return true; } diff --git a/com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs b/com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs index ec21badf76..c337feb5b0 100644 --- a/com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs +++ b/com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs @@ -260,7 +260,7 @@ public override void OnInspectorGUI() if (m_NetworkTransportProperty.objectReferenceValue == null) { - EditorGUILayout.HelpBox("You have no transport selected. A transport is required for the MLAPI to work. Which one do you want?", MessageType.Warning); + EditorGUILayout.HelpBox("You have no transport selected. A transport is required for netcode to work. Which one do you want?", MessageType.Warning); int selection = EditorGUILayout.Popup(0, m_TransportNames); diff --git a/com.unity.multiplayer.mlapi/Prototyping/NetworkAnimator.cs b/com.unity.multiplayer.mlapi/Prototyping/NetworkAnimator.cs index 5a3df308df..a13bb2d201 100644 --- a/com.unity.multiplayer.mlapi/Prototyping/NetworkAnimator.cs +++ b/com.unity.multiplayer.mlapi/Prototyping/NetworkAnimator.cs @@ -7,7 +7,7 @@ namespace Unity.Netcode.Prototyping /// /// A prototype component for syncing animations /// - [AddComponentMenu("MLAPI/NetworkAnimator")] + [AddComponentMenu("Netcode/" + nameof(NetworkAnimator))] public class NetworkAnimator : NetworkBehaviour { diff --git a/com.unity.multiplayer.mlapi/Prototyping/NetworkNavMeshAgent.cs b/com.unity.multiplayer.mlapi/Prototyping/NetworkNavMeshAgent.cs index 930234a57a..6163f4a965 100644 --- a/com.unity.multiplayer.mlapi/Prototyping/NetworkNavMeshAgent.cs +++ b/com.unity.multiplayer.mlapi/Prototyping/NetworkNavMeshAgent.cs @@ -7,7 +7,7 @@ namespace Unity.Netcode.Prototyping /// /// A prototype component for syncing NavMeshAgents /// - [AddComponentMenu("MLAPI/NetworkNavMeshAgent")] + [AddComponentMenu("Netcode/" + nameof(NetworkNavMeshAgent))] [RequireComponent(typeof(NavMeshAgent))] public class NetworkNavMeshAgent : NetworkBehaviour { diff --git a/com.unity.multiplayer.mlapi/Prototyping/NetworkTransform.cs b/com.unity.multiplayer.mlapi/Prototyping/NetworkTransform.cs index a6b8a72a09..38300cf668 100644 --- a/com.unity.multiplayer.mlapi/Prototyping/NetworkTransform.cs +++ b/com.unity.multiplayer.mlapi/Prototyping/NetworkTransform.cs @@ -6,7 +6,7 @@ namespace Unity.Netcode.Prototyping /// /// A prototype component for syncing transforms /// - [AddComponentMenu("MLAPI/NetworkTransform")] + [AddComponentMenu("Netcode/" + nameof(NetworkTransform))] public class NetworkTransform : NetworkBehaviour { /// diff --git a/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConfig.cs b/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConfig.cs index 57d3af533b..a16d8963f4 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConfig.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConfig.cs @@ -60,9 +60,9 @@ public class NetworkConfig /// - /// The tickrate of network ticks. This value controls how often MLAPI runs user code and sends out data. + /// The tickrate of network ticks. This value controls how often netcode runs user code and sends out data. /// - [Tooltip("The tickrate. This value controls how often MLAPI runs user code and sends out data. The value is in 'ticks per seconds' which means a value of 50 will result in 50 ticks being executed per second or a fixed delta time of 0.02.")] + [Tooltip("The tickrate. This value controls how often netcode runs user code and sends out data. The value is in 'ticks per seconds' which means a value of 50 will result in 50 ticks being executed per second or a fixed delta time of 0.02.")] public int TickRate = 30; /// @@ -117,10 +117,10 @@ public class NetworkConfig public bool EnableSceneManagement = true; /// - /// Whether or not the MLAPI should check for differences in the prefabs at connection. + /// Whether or not the netcode should check for differences in the prefabs at connection. /// If you dynamically add prefabs at runtime, turn this OFF /// - [Tooltip("Whether or not the MLAPI should check for differences in the prefab lists at connection")] + [Tooltip("Whether or not the netcode should check for differences in the prefab lists at connection")] public bool ForceSamePrefabs = true; /// diff --git a/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConstants.cs b/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConstants.cs index 2ef032e7cd..55facaf746 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConstants.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConstants.cs @@ -1,7 +1,7 @@ namespace Unity.Netcode { /// - /// A static class containing MLAPI constants + /// A static class containing network constants /// internal static class NetworkConstants { diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs index 3a253bfa14..bcc8e9b9b2 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs @@ -11,7 +11,7 @@ namespace Unity.Netcode /// /// The main component of the library /// - [AddComponentMenu("MLAPI/NetworkManager", -100)] + [AddComponentMenu("Netcode/" + nameof(NetworkManager), -100)] public class NetworkManager : MonoBehaviour, INetworkUpdateSystem, IProfilableTransportProvider { #pragma warning disable IDE1006 // disable naming rule violation check @@ -273,7 +273,7 @@ private void OnValidate() { if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) { - NetworkLog.LogWarning("Active scene is not registered as a network scene. The MLAPI has added it"); + NetworkLog.LogWarning("Active scene is not registered as a network scene. Netcode has added it"); } NetworkConfig.RegisteredScenes.Add(activeSceneName); @@ -725,7 +725,7 @@ public void StopHost() IsClient = false; StopServer(); - //We don't stop client since we dont actually have a transport connection to our own host. We just handle host messages directly in the MLAPI + //We don't stop client since we dont actually have a transport connection to our own host. We just handle host messages directly in the netcode } /// diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkObject.cs b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkObject.cs index 661e350d48..fd4f6d533f 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/NetworkObject.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Core/NetworkObject.cs @@ -10,7 +10,7 @@ namespace Unity.Netcode /// /// A component used to identify that a GameObject in the network /// - [AddComponentMenu("MLAPI/NetworkObject", -99)] + [AddComponentMenu("Netcode/" + nameof(NetworkObject), -99)] [DisallowMultipleComponent] public sealed class NetworkObject : MonoBehaviour { @@ -151,7 +151,7 @@ internal set public delegate bool VisibilityDelegate(ulong clientId); /// - /// Delegate invoked when the MLAPI needs to know if the object should be visible to a client, if null it will assume true + /// Delegate invoked when the netcode needs to know if the object should be visible to a client, if null it will assume true /// public VisibilityDelegate CheckObjectVisibility = null; @@ -162,7 +162,7 @@ internal set public delegate bool SpawnDelegate(ulong clientId); /// - /// Delegate invoked when the MLAPI needs to know if it should include the transform when spawning the object, if null it will assume true + /// Delegate invoked when the netcode needs to know if it should include the transform when spawning the object, if null it will assume true /// public SpawnDelegate IncludeTransformWhenSpawning = null; @@ -259,7 +259,7 @@ public static void NetworkShow(List networkObjects, ulong clientI } - // Do the safety loop first to prevent putting the MLAPI in an invalid state. + // Do the safety loop first to prevent putting the netcode in an invalid state. for (int i = 0; i < networkObjects.Count; i++) { if (!networkObjects[i].IsSpawned) @@ -366,7 +366,7 @@ public static void NetworkHide(List networkObjects, ulong clientI throw new VisibilityChangeException("Cannot hide an object from the server"); } - // Do the safety loop first to prevent putting the MLAPI in an invalid state. + // Do the safety loop first to prevent putting the netcode in an invalid state. for (int i = 0; i < networkObjects.Count; i++) { if (!networkObjects[i].IsSpawned) diff --git a/com.unity.multiplayer.mlapi/Runtime/Core/SnapshotSystem.cs b/com.unity.multiplayer.mlapi/Runtime/Core/SnapshotSystem.cs index f99186cba9..0050ff3f55 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Core/SnapshotSystem.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Core/SnapshotSystem.cs @@ -407,7 +407,7 @@ private void WriteBuffer(NetworkBuffer buffer) // todo: consider using a Key, instead of 3 ints, if it can be exposed /// - /// Called by the rest of MLAPI when a NetworkVariable changed and need to go in our snapshot + /// Called by the rest of the netcode when a NetworkVariable changed and need to go in our snapshot /// Might not happen for all variable on every frame. Might even happen more than once. /// /// The NetworkVariable to write, or rather, its INetworkVariable diff --git a/com.unity.multiplayer.mlapi/Runtime/Logging/NetworkLog.cs b/com.unity.multiplayer.mlapi/Runtime/Logging/NetworkLog.cs index f07af19f91..008a1ff6ed 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Logging/NetworkLog.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Logging/NetworkLog.cs @@ -13,10 +13,10 @@ public static class NetworkLog /// The current log level. internal static LogLevel CurrentLogLevel => NetworkManager.Singleton == null ? LogLevel.Normal : NetworkManager.Singleton.LogLevel; - // MLAPI internal logging - internal static void LogInfo(string message) => Debug.Log($"[MLAPI] {message}"); - internal static void LogWarning(string message) => Debug.LogWarning($"[MLAPI] {message}"); - internal static void LogError(string message) => Debug.LogError($"[MLAPI] {message}"); + // internal logging + internal static void LogInfo(string message) => Debug.Log($"[Netcode] {message}"); + internal static void LogWarning(string message) => Debug.LogWarning($"[Netcode] {message}"); + internal static void LogError(string message) => Debug.LogError($"[Netcode] {message}"); /// /// Logs an info log locally and on the server if possible. @@ -70,9 +70,9 @@ private static void LogServer(string message, LogType logType) } } - internal static void LogInfoServerLocal(string message, ulong sender) => Debug.Log($"[MLAPI_SERVER Sender={sender}] {message}"); - internal static void LogWarningServerLocal(string message, ulong sender) => Debug.LogWarning($"[MLAPI_SERVER Sender={sender}] {message}"); - internal static void LogErrorServerLocal(string message, ulong sender) => Debug.LogError($"[MLAPI_SERVER Sender={sender}] {message}"); + internal static void LogInfoServerLocal(string message, ulong sender) => Debug.Log($"[Netcode-Server Sender={sender}] {message}"); + internal static void LogWarningServerLocal(string message, ulong sender) => Debug.LogWarning($"[Netcode-Server Sender={sender}] {message}"); + internal static void LogErrorServerLocal(string message, ulong sender) => Debug.LogError($"[Netcode-Server Sender={sender}] {message}"); internal enum LogType { diff --git a/com.unity.multiplayer.mlapi/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.multiplayer.mlapi/Runtime/SceneManagement/NetworkSceneManager.cs index a2c98842fd..c96e2b8f22 100644 --- a/com.unity.multiplayer.mlapi/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.multiplayer.mlapi/Runtime/SceneManagement/NetworkSceneManager.cs @@ -335,7 +335,7 @@ private void OnSceneLoaded(Guid switchSceneGuid, Stream objectStream) private void OnServerLoadedScene(Guid switchSceneGuid) { - // Register in-scene placed NetworkObjects with MLAPI + // Register in-scene placed NetworkObjects with the netcode foreach (var keyValuePair in ScenePlacedObjects) { if (!keyValuePair.Value.IsPlayerObject) diff --git a/com.unity.multiplayer.mlapi/Runtime/Serialization/SerializationManager.cs b/com.unity.multiplayer.mlapi/Runtime/Serialization/SerializationManager.cs index 031d12a5dc..4d0614b04d 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Serialization/SerializationManager.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Serialization/SerializationManager.cs @@ -8,7 +8,7 @@ namespace Unity.Netcode { /// - /// Helper class to manage the MLAPI serialization. + /// Helper class to manage the netcode serialization /// public static class SerializationManager { diff --git a/com.unity.multiplayer.mlapi/Runtime/Transports/MultiplexTransportAdapter.cs b/com.unity.multiplayer.mlapi/Runtime/Transports/MultiplexTransportAdapter.cs index 1cc4309776..ecf660b8ac 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Transports/MultiplexTransportAdapter.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Transports/MultiplexTransportAdapter.cs @@ -29,7 +29,7 @@ public enum ConnectionIdSpreadMethod /// /// Drops the last few bits (right side) and replaces them with the transport index. /// Ensure that ALL transports dont use the last bits in their produced clientId. - /// This option is for advanced users and will not work with the official MLAPI transports as they use the last bits. + /// This option is for advanced users and will not work with the official netcode transports as they use the last bits. /// ReplaceLastBits, diff --git a/com.unity.multiplayer.mlapi/Runtime/Transports/Tests/Editor/TransportTest.cs b/com.unity.multiplayer.mlapi/Runtime/Transports/Tests/Editor/TransportTest.cs index efa0085e37..c9d5b73600 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Transports/Tests/Editor/TransportTest.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Transports/Tests/Editor/TransportTest.cs @@ -51,13 +51,13 @@ public void UNetCustomChannelRegistrationTest() nm.Shutdown(); ut.Channels.Clear(); - // test 2: add a bogus channel (one that intersects with the MLAPI built-in ones.) Expect failure + // test 2: add a bogus channel (one that intersects with the netcode built-in ones.) Expect failure ut.Channels.Add(new UNetChannel { Id = (byte)NetworkChannel.Internal, Type = QosType.Unreliable }); try { nm.StartServer(); - Assert.Fail("The UNet transport allowed registration of an MLAPI-reserved channel"); + Assert.Fail("The UNet transport allowed registration of an netcode-reserved channel"); } catch (Exception ex) { diff --git a/com.unity.multiplayer.mlapi/Runtime/Transports/TransportChannel.cs b/com.unity.multiplayer.mlapi/Runtime/Transports/TransportChannel.cs index c9cb65c07b..af35804a93 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Transports/TransportChannel.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Transports/TransportChannel.cs @@ -3,7 +3,7 @@ namespace Unity.Netcode { /// - /// A transport channel used by the MLAPI + /// A transport channel used by the netcode /// [Serializable] public struct TransportChannel diff --git a/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/RelayTransport.cs b/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/RelayTransport.cs index 02318b8400..c5edda9267 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/RelayTransport.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/RelayTransport.cs @@ -519,7 +519,7 @@ private static NetworkEventType BaseReceive(NetworkEventType netEvent, int hostI { if ((NetworkError)error == NetworkError.CRCMismatch) { - Debug.LogError("[Netcode.Relay] The MLAPI Relay detected a CRC mismatch. This could be due to the maxClients or other connectionConfig settings not being the same"); + Debug.LogError("[Netcode.Relay] Relay detected a CRC mismatch. This could be due to the maxClients or other connectionConfig settings not being the same"); } return NetworkEventType.DisconnectEvent; diff --git a/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetChannel.cs b/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetChannel.cs index a2d0a7f0f5..1e1afc0065 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetChannel.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetChannel.cs @@ -8,7 +8,7 @@ namespace Unity.Netcode.Transports.UNET { /// - /// A transport channel used by the MLAPI + /// A transport channel used by the netcode /// [Serializable] public class UNetChannel diff --git a/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetTransport.cs b/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetTransport.cs index e7148d119d..ece8aa1149 100644 --- a/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetTransport.cs +++ b/com.unity.multiplayer.mlapi/Runtime/Transports/UNET/UNetTransport.cs @@ -35,7 +35,7 @@ public enum SendMode // transport.Channels.Add( // new UNetChannel() // { - // Id = Channel.ChannelUnused + MY_CHANNEL, <<-- must offset from reserved channel offset in MLAPI SDK + // Id = Channel.ChannelUnused + MY_CHANNEL, <<-- must offset from reserved channel offset in netcode SDK // Type = QosType.Unreliable // } // ); @@ -395,7 +395,7 @@ public ConnectionConfig GetConfig() { var connectionConfig = new ConnectionConfig(); - // MLAPI built-in channels + // Built-in netcode channels for (int i = 0; i < NETCODE_CHANNELS.Length; i++) { int channelId = AddNetcodeChannel(NETCODE_CHANNELS[i].Delivery, connectionConfig); diff --git a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerCustomMessageManagerTests.cs b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerCustomMessageManagerTests.cs index 2593688ef8..2da24c6d38 100644 --- a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerCustomMessageManagerTests.cs +++ b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerCustomMessageManagerTests.cs @@ -14,7 +14,7 @@ public void CustomMessageManagerAssigned() var networkManager = gameObject.AddComponent(); var transport = gameObject.AddComponent(); - // MLAPI sets this in validate + // Netcode sets this in validate networkManager.NetworkConfig = new NetworkConfig() { // Set the current scene to prevent unexpected log messages which would trigger a failure diff --git a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerMessageHandlerTests.cs b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerMessageHandlerTests.cs index 34150595dc..0aafc0754a 100644 --- a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerMessageHandlerTests.cs +++ b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerMessageHandlerTests.cs @@ -19,7 +19,7 @@ public void MessageHandlerReceivedMessageServerClient() var networkManager = gameObject.AddComponent(); var transport = gameObject.AddComponent(); - // MLAPI sets this in validate + // Netcode sets this in validate networkManager.NetworkConfig = new NetworkConfig() { // Set the current scene to prevent unexpected log messages which would trigger a failure diff --git a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerSceneManagerTests.cs b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerSceneManagerTests.cs index 45daa164bb..c641b2f4b1 100644 --- a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerSceneManagerTests.cs +++ b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerSceneManagerTests.cs @@ -14,7 +14,7 @@ public void SceneManagerAssigned() var networkManager = gameObject.AddComponent(); var transport = gameObject.AddComponent(); - // MLAPI sets this in validate + // Netcode sets this in validate networkManager.NetworkConfig = new NetworkConfig() { // Set the current scene to prevent unexpected log messages which would trigger a failure diff --git a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkObjectTests.cs b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkObjectTests.cs index 186da8377c..d887dcf75b 100644 --- a/com.unity.multiplayer.mlapi/Tests/Editor/NetworkObjectTests.cs +++ b/com.unity.multiplayer.mlapi/Tests/Editor/NetworkObjectTests.cs @@ -37,9 +37,9 @@ public void GetBehaviourIndexNone() var networkObject = gameObject.AddComponent(); // TODO: Maybe not hardcode message? - LogAssert.Expect(LogType.Error, $"[MLAPI] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); - LogAssert.Expect(LogType.Error, $"[MLAPI] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); - LogAssert.Expect(LogType.Error, $"[MLAPI] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); + LogAssert.Expect(LogType.Error, $"[Netcode] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); + LogAssert.Expect(LogType.Error, $"[Netcode] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); + LogAssert.Expect(LogType.Error, $"[Netcode] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); Assert.That(networkObject.GetNetworkBehaviourAtOrderIndex(0), Is.Null); Assert.That(networkObject.GetNetworkBehaviourAtOrderIndex(1), Is.Null); @@ -57,8 +57,8 @@ public void GetBehaviourIndexOne() var networkBehaviour = gameObject.AddComponent(); // TODO: Maybe not hardcode message? - LogAssert.Expect(LogType.Error, $"[MLAPI] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); - LogAssert.Expect(LogType.Error, $"[MLAPI] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); + LogAssert.Expect(LogType.Error, $"[Netcode] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); + LogAssert.Expect(LogType.Error, $"[Netcode] Behaviour index was out of bounds. Did you mess up the order of your {nameof(NetworkBehaviour)}s?"); Assert.That(networkObject.GetNetworkBehaviourAtOrderIndex(0), Is.EqualTo(networkBehaviour)); Assert.That(networkObject.GetNetworkBehaviourAtOrderIndex(1), Is.Null); diff --git a/com.unity.multiplayer.mlapi/Tests/Runtime/Helpers/NetworkManagerHelper.cs b/com.unity.multiplayer.mlapi/Tests/Runtime/Helpers/NetworkManagerHelper.cs index 2501a93460..91cbe0a571 100644 --- a/com.unity.multiplayer.mlapi/Tests/Runtime/Helpers/NetworkManagerHelper.cs +++ b/com.unity.multiplayer.mlapi/Tests/Runtime/Helpers/NetworkManagerHelper.cs @@ -185,7 +185,7 @@ private static void StartNetworkManagerMode(NetworkManagerOperatingMode managerM } } - // If we started an MLAPI session + // If we started an netcode session if (CurrentNetworkManagerMode != NetworkManagerOperatingMode.None) { // With some unit tests the Singleton can still be from a previous unit test @@ -195,7 +195,7 @@ private static void StartNetworkManagerMode(NetworkManagerOperatingMode managerM NetworkManagerObject.SetSingleton(); } - // Only log this if we started an MLAPI session + // Only log this if we started an netcode session Debug.Log($"{CurrentNetworkManagerMode} started."); } } diff --git a/com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs b/com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs index 0d1a9b12a3..4cc85f24d1 100644 --- a/com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs +++ b/com.unity.multiplayer.mlapi/Tests/Runtime/RpcQueueTests.cs @@ -24,7 +24,7 @@ public void Setup() /// /// Tests to make sure providing different - /// ** This does not include any of the MLAPI to Transport code ** + /// ** This does not include any of the Netcode to Transport code ** /// /// IEnumerator [UnityTest, Order(1)] diff --git a/com.unity.multiplayer.mlapi/Tests/Runtime/Transport/SIPTransport.cs b/com.unity.multiplayer.mlapi/Tests/Runtime/Transport/SIPTransport.cs index 909a061a89..5381a22fb3 100644 --- a/com.unity.multiplayer.mlapi/Tests/Runtime/Transport/SIPTransport.cs +++ b/com.unity.multiplayer.mlapi/Tests/Runtime/Transport/SIPTransport.cs @@ -7,8 +7,8 @@ namespace Unity.Netcode.RuntimeTests { /// /// SIPTransport (SIngleProcessTransport) - /// is a NetworkTransport designed to be used with multiple MLAPI instances in a single process - /// it's designed for the MLAPI in a way where no networking stack has to be available + /// is a NetworkTransport designed to be used with multiple network instances in a single process + /// it's designed for the netcode in a way where no networking stack has to be available /// it's designed for testing purposes and it's not designed with speed in mind /// [DontShowInTransportDropdown] @@ -226,7 +226,7 @@ public override void Send(ulong clientId, ArraySegment data, NetworkChanne { if (m_LocalConnection != null) { - // Create copy since MLAPI wants the byte array back straight after the method call. + // Create copy since netcode wants the byte array back straight after the method call. // Hard on GC. byte[] copy = new byte[data.Count]; Buffer.BlockCopy(data.Array, data.Offset, copy, 0, data.Count); diff --git a/testproject/Assets/Scripts/CommandLineHandler.cs b/testproject/Assets/Scripts/CommandLineHandler.cs index 4c5740b642..bf833aa88d 100644 --- a/testproject/Assets/Scripts/CommandLineHandler.cs +++ b/testproject/Assets/Scripts/CommandLineHandler.cs @@ -13,7 +13,7 @@ /// -ip | IP address of the host-server. /// -p | The connection listening port. /// -fr | Set the target frame rate. -/// -m (?)| Start MLAPI in one of 3 modes: client, host, server +/// -m (?)| Start network in one of 3 modes: client, host, server /// public class CommandLineProcessor { @@ -58,9 +58,9 @@ public CommandLineProcessor(string[] args) public bool AutoConnectEnabled() { - if (m_CommandLineArguments.TryGetValue("-m", out string mlapiValue)) + if (m_CommandLineArguments.TryGetValue("-m", out string netcodeValue)) { - switch (mlapiValue) + switch (netcodeValue) { case "server": case "host": @@ -106,9 +106,9 @@ public void ProcessCommandLine() m_CommandLineArguments.Remove("-fr"); } - if (m_CommandLineArguments.TryGetValue("-m", out string mlapiValue)) + if (m_CommandLineArguments.TryGetValue("-m", out string netcodeValue)) { - switch (mlapiValue) + switch (netcodeValue) { case "server": StartServer(); @@ -120,7 +120,7 @@ public void ProcessCommandLine() StartClient(); break; default: - Debug.LogWarning($"Invalid MLAPI argument: {mlapiValue}"); + Debug.LogWarning($"Invalid netcode argument: {netcodeValue}"); break; } } diff --git a/testproject/Assets/Scripts/ConnectionModeScript.cs b/testproject/Assets/Scripts/ConnectionModeScript.cs index 4ab904676b..cb87892cec 100644 --- a/testproject/Assets/Scripts/ConnectionModeScript.cs +++ b/testproject/Assets/Scripts/ConnectionModeScript.cs @@ -57,7 +57,7 @@ private void Start() } /// - /// Handles starting MLAPI in server mode + /// Handles starting netcode in server mode /// public void OnStartServer() { @@ -71,7 +71,7 @@ public void OnStartServer() } /// - /// Handles starting MLAPI in host mode + /// Handles starting netcode in host mode /// public void OnStartHost() { @@ -84,7 +84,7 @@ public void OnStartHost() } /// - /// Handles starting MLAPI in client mode + /// Handles starting netcode in client mode /// public void OnStartClient() { diff --git a/testproject/Assets/Scripts/MenuManagement/MenuReference.cs b/testproject/Assets/Scripts/MenuManagement/MenuReference.cs index 1b9a80d310..81143b7daf 100644 --- a/testproject/Assets/Scripts/MenuManagement/MenuReference.cs +++ b/testproject/Assets/Scripts/MenuManagement/MenuReference.cs @@ -1,14 +1,14 @@ using System.Collections.Generic; using UnityEngine; -#if UNITY_EDITOR +#if UNITY_EDITOR using UnityEditor; #endif -[CreateAssetMenu(fileName = "MenuReference", menuName = "MLAPI/MenuReference")] +[CreateAssetMenu(fileName = nameof(MenuReference), menuName = "Netcode/" + nameof(MenuReference))] public class MenuReference : ScriptableObject, ISceneReference { -#if UNITY_EDITOR +#if UNITY_EDITOR public SceneAsset MenuScene; #endif [SerializeField] @@ -18,7 +18,7 @@ public class MenuReference : ScriptableObject, ISceneReference [SerializeField] private List m_ReferencedScenes; -#if UNITY_EDITOR +#if UNITY_EDITOR private void OnValidate() { if (m_ReferencedScenes == null) diff --git a/testproject/Assets/Scripts/MenuManagement/SceneReference.cs b/testproject/Assets/Scripts/MenuManagement/SceneReference.cs index b509980155..7fed48716f 100644 --- a/testproject/Assets/Scripts/MenuManagement/SceneReference.cs +++ b/testproject/Assets/Scripts/MenuManagement/SceneReference.cs @@ -5,11 +5,11 @@ using UnityEditor; #endif -[CreateAssetMenu(fileName = "SceneReference", menuName = "MLAPI/SceneReference")] +[CreateAssetMenu(fileName = nameof(SceneReference), menuName = "Netcode/" + nameof(SceneReference))] [Serializable] public class SceneReference : ScriptableObject, ISceneReference { -#if UNITY_EDITOR +#if UNITY_EDITOR public SceneAsset SceneToReference; [SerializeField] private List m_IncludedScenes; @@ -21,7 +21,7 @@ public class SceneReference : ScriptableObject, ISceneReference [SerializeField] private List m_ReferencedScenes; -#if UNITY_EDITOR +#if UNITY_EDITOR private void OnValidate() { if (m_ReferencedScenes == null) diff --git a/testproject/Assets/Scripts/SyncTransform.cs b/testproject/Assets/Scripts/SyncTransform.cs index 059b3a9369..9d774757f7 100644 --- a/testproject/Assets/Scripts/SyncTransform.cs +++ b/testproject/Assets/Scripts/SyncTransform.cs @@ -7,7 +7,7 @@ namespace Unity.Netcode /// Initial goal: allow an FPS-style snapshot /// with variables updating at specific place in the frame /// - [AddComponentMenu("MLAPI/SyncTransform")] + [AddComponentMenu("Netcode/" + nameof(SyncTransform))] // todo: check inheriting from NetworkBehaviour. Currently needed for IsOwner, to synchronize position public class SyncTransform : NetworkBehaviour { diff --git a/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs b/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs index e587477aae..6fa3a56325 100644 --- a/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs +++ b/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs @@ -316,7 +316,7 @@ private void InitializeNetworkManager() } /// - /// Invoked upon the attached NetworkObject component being initialized by MLAPI + /// Invoked upon the attached NetworkObject component being initialized by the netcode /// public override void OnNetworkSpawn() { diff --git a/testproject/Assets/Tests/Manual/Scripts/BandwidthTest.cs b/testproject/Assets/Tests/Manual/Scripts/BandwidthTest.cs index 264414d1e9..17244686f4 100644 --- a/testproject/Assets/Tests/Manual/Scripts/BandwidthTest.cs +++ b/testproject/Assets/Tests/Manual/Scripts/BandwidthTest.cs @@ -6,7 +6,7 @@ namespace TestProject.ManualTests /// /// A prototype component for syncing transforms /// - [AddComponentMenu("MLAPI/BandwidthTest")] + [AddComponentMenu("Netcode/" + nameof(BandwidthTest))] public class BandwidthTest : NetworkBehaviour { private int m_IdCount = 2000; diff --git a/testproject/Assets/Tests/Manual/Scripts/NetworkSceneManagerCallbackTests.cs b/testproject/Assets/Tests/Manual/Scripts/NetworkSceneManagerCallbackTests.cs index a4b04d458e..619d8d804f 100644 --- a/testproject/Assets/Tests/Manual/Scripts/NetworkSceneManagerCallbackTests.cs +++ b/testproject/Assets/Tests/Manual/Scripts/NetworkSceneManagerCallbackTests.cs @@ -3,7 +3,7 @@ namespace TestProject.ManualTests { - [AddComponentMenu("MLAPI/NetworkSceneManagerCallbackTests")] + [AddComponentMenu("Netcode/" + nameof(NetworkSceneManagerCallbackTests))] public class NetworkSceneManagerCallbackTests : NetworkBehaviour { public void StartHost() diff --git a/testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/BuildMultiprocessTestPlayer.cs b/testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/BuildMultiprocessTestPlayer.cs index 8f344061aa..ba104069cb 100644 --- a/testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/BuildMultiprocessTestPlayer.cs +++ b/testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/BuildMultiprocessTestPlayer.cs @@ -14,7 +14,7 @@ namespace Unity.Netcode.MultiprocessRuntimeTests /// public static class BuildMultiprocessTestPlayer { - public const string MultiprocessBaseMenuName = "MLAPI/Multiprocess Test"; + public const string MultiprocessBaseMenuName = "Netcode/Multiprocess Test"; public const string BuildAndExecuteMenuName = MultiprocessBaseMenuName + "/Build Test Player #t"; public const string MainSceneName = "MultiprocessTestScene"; diff --git a/testproject/Assets/Tests/Runtime/MultiprocessRuntime/TestCoordinator.cs b/testproject/Assets/Tests/Runtime/MultiprocessRuntime/TestCoordinator.cs index 8664a7c3e1..b9ddc01220 100644 --- a/testproject/Assets/Tests/Runtime/MultiprocessRuntime/TestCoordinator.cs +++ b/testproject/Assets/Tests/Runtime/MultiprocessRuntime/TestCoordinator.cs @@ -15,7 +15,7 @@ /// to coordinate test execution between client and server with that model. /// The only per tests communication already existing is to get the results per test as they are running /// With this test coordinator, it's not possible to start a main test node with the test runner and have that server start other worker nodes -/// on which to execute client tests. We use MLAPI as both a test framework and as the target of our performance tests. +/// on which to execute client tests. We use netcode as both a test framework and as the target of our performance tests. /// [RequireComponent(typeof(NetworkObject))] public class TestCoordinator : NetworkBehaviour @@ -54,7 +54,7 @@ public void Start() bool isClient = Environment.GetCommandLineArgs().Any(value => value == MultiprocessOrchestration.IsWorkerArg); if (isClient) { - Debug.Log("starting MLAPI client"); + Debug.Log("starting netcode client"); NetworkManager.Singleton.StartClient(); } From 9e886d59dc30281923335bd82fc450ff1a1336d6 Mon Sep 17 00:00:00 2001 From: "M. Fatih MAR" Date: Wed, 4 Aug 2021 23:47:49 +0100 Subject: [PATCH 2/3] chore: cleanup/upgrade serialized scenes --- ...NetworkPrefabGlobalObjectIdHashTests.unity | 38 ++++++++++--------- testproject/Assets/MainMenu.unity | 4 +- .../EnableDisableSceneNetworkObject.unity | 21 +++------- .../PrefabPool/PrefabPoolExample.unity | 15 +++----- .../PrefabPoolOverrideExample.unity | 16 +++----- testproject/Assets/Samples/SamplesMenu.unity | 6 +-- .../Assets/Scenes/MultiprocessTestScene.unity | 14 +++---- testproject/Assets/Scenes/SampleScene.unity | 9 ++--- .../ConnectionApprovalTest.unity | 17 ++++----- .../Assets/Tests/Manual/ManualTestsMenu.unity | 4 +- .../SceneWeAreSwitchingFrom.unity | 19 ++++------ .../Tests/Manual/RpcTesting/RpcTesting.unity | 17 ++++----- .../SceneTransitioningTest.unity | 15 +++----- 13 files changed, 80 insertions(+), 115 deletions(-) diff --git a/com.unity.multiplayer.mlapi/Tests/Runtime/GlobalObjectIdHash/NetworkPrefabGlobalObjectIdHashTests.unity b/com.unity.multiplayer.mlapi/Tests/Runtime/GlobalObjectIdHash/NetworkPrefabGlobalObjectIdHashTests.unity index e0da42832c..c4ae260302 100644 --- a/com.unity.multiplayer.mlapi/Tests/Runtime/GlobalObjectIdHash/NetworkPrefabGlobalObjectIdHashTests.unity +++ b/com.unity.multiplayer.mlapi/Tests/Runtime/GlobalObjectIdHash/NetworkPrefabGlobalObjectIdHashTests.unity @@ -218,7 +218,7 @@ GameObject: - component: {fileID: 1102477897} - component: {fileID: 1102477896} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -245,9 +245,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!114 &1102477897 MonoBehaviour: @@ -270,22 +270,27 @@ MonoBehaviour: RegisteredScenes: - NetworkPrefabGlobalObjectIdHashTests AllowRuntimeSceneChanges: 0 + PlayerPrefab: {fileID: 0} NetworkPrefabs: - - Prefab: {fileID: 6634540090042209438, guid: 7006127095cef495b808ea027e90bf91, + - Override: 0 + Prefab: {fileID: 6634540090042209438, guid: 7006127095cef495b808ea027e90bf91, type: 3} - IsPlayer: 1 - - Prefab: {fileID: 5253977552660788477, guid: e9ff9ca5dee4e4a0e9aba758527ed56e, + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 5253977552660788477, guid: e9ff9ca5dee4e4a0e9aba758527ed56e, type: 3} - IsPlayer: 0 - - Prefab: {fileID: 8106213239008607392, guid: 08036a5a809c74816892f96d72e1ca81, + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 8106213239008607392, guid: 08036a5a809c74816892f96d72e1ca81, type: 3} - IsPlayer: 0 - PlayerPrefabHash: 2044183727 - CreatePlayerPrefab: 1 - ReceiveTickrate: 64 - NetworkTickIntervalSec: 0.05 - MaxReceiveEventsPerTickRate: 500 - EventTickrate: 64 + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + TickRate: 30 ClientConnectionBufferTimeout: 10 ConnectionApproval: 0 ConnectionData: @@ -299,7 +304,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!4 &1102477898 diff --git a/testproject/Assets/MainMenu.unity b/testproject/Assets/MainMenu.unity index b07bf694ba..2e2140ad3d 100644 --- a/testproject/Assets/MainMenu.unity +++ b/testproject/Assets/MainMenu.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -943,7 +943,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: MLAPI Main Menu + m_Text: Netcode Main Menu --- !u!222 &1178849204 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/testproject/Assets/Samples/EnableDisableNetworkObject/EnableDisableSceneNetworkObject.unity b/testproject/Assets/Samples/EnableDisableNetworkObject/EnableDisableSceneNetworkObject.unity index bdb5cb5791..b6f45491da 100644 --- a/testproject/Assets/Samples/EnableDisableNetworkObject/EnableDisableSceneNetworkObject.unity +++ b/testproject/Assets/Samples/EnableDisableNetworkObject/EnableDisableSceneNetworkObject.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -631,7 +631,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -727,7 +726,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -823,7 +821,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1323,7 +1320,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1409,7 +1405,7 @@ GameObject: - component: {fileID: 1706952616} - component: {fileID: 1706952615} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1440,10 +1436,7 @@ MonoBehaviour: PlayerPrefab: {fileID: 4079352819444256614, guid: c16f03336b6104576a565ef79ad643c0, type: 3} NetworkPrefabs: [] - ReceiveTickrate: 64 - NetworkTickIntervalSec: 0.05 - MaxReceiveEventsPerTickRate: 500 - EventTickrate: 64 + TickRate: 30 ClientConnectionBufferTimeout: 10 ConnectionApproval: 0 ConnectionData: @@ -1457,7 +1450,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!114 &1706952616 @@ -1481,9 +1473,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!4 &1706952617 Transform: @@ -1622,7 +1614,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 diff --git a/testproject/Assets/Samples/PrefabPool/PrefabPoolExample.unity b/testproject/Assets/Samples/PrefabPool/PrefabPoolExample.unity index b3869569bb..469ad83c59 100644 --- a/testproject/Assets/Samples/PrefabPool/PrefabPoolExample.unity +++ b/testproject/Assets/Samples/PrefabPool/PrefabPoolExample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -265,7 +265,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -564,7 +563,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -852,7 +850,7 @@ GameObject: - component: {fileID: 1024114719} - component: {fileID: 1024114718} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -927,9 +925,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!4 &1024114720 Transform: @@ -1087,7 +1085,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1461,7 +1458,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1682,7 +1678,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 diff --git a/testproject/Assets/Samples/PrefabPool/PrefabPoolOverrideExample.unity b/testproject/Assets/Samples/PrefabPool/PrefabPoolOverrideExample.unity index ec140fb1aa..d3ffd1e1ec 100644 --- a/testproject/Assets/Samples/PrefabPool/PrefabPoolOverrideExample.unity +++ b/testproject/Assets/Samples/PrefabPool/PrefabPoolOverrideExample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -265,7 +265,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -564,7 +563,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -852,7 +850,7 @@ GameObject: - component: {fileID: 1024114719} - component: {fileID: 1024114718} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -928,9 +926,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!4 &1024114720 Transform: @@ -984,7 +982,6 @@ MonoBehaviour: - {fileID: 1991364468704639885, guid: 2ab098de4ccb3a8459b88084b29fd0ac, type: 3} - {fileID: 6137946741893414299, guid: d2bccc96d1636264fa43b546a1b617c3, type: 3} m_ObjectPoolSize: 15 - m_SynchronizeOverrides: 1 m_SpawnsPerSecond: 2 --- !u!4 &1113539280 Transform: @@ -1094,7 +1091,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1468,7 +1464,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1689,7 +1684,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 diff --git a/testproject/Assets/Samples/SamplesMenu.unity b/testproject/Assets/Samples/SamplesMenu.unity index 6fe81d20a1..4837d0a589 100644 --- a/testproject/Assets/Samples/SamplesMenu.unity +++ b/testproject/Assets/Samples/SamplesMenu.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1896,7 +1896,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: MLAPI SAMPLES + m_Text: Netcode Samples --- !u!222 &1996333346 CanvasRenderer: m_ObjectHideFlags: 0 @@ -3598,7 +3598,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: MLAPI + m_Text: Netcode Samples --- !u!222 &8786710036155684099 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/testproject/Assets/Scenes/MultiprocessTestScene.unity b/testproject/Assets/Scenes/MultiprocessTestScene.unity index c767c54cd0..5971bd488a 100644 --- a/testproject/Assets/Scenes/MultiprocessTestScene.unity +++ b/testproject/Assets/Scenes/MultiprocessTestScene.unity @@ -658,7 +658,7 @@ GameObject: - component: {fileID: 1211923377} - component: {fileID: 1211923378} m_Layer: 0 - m_Name: NetworkManager-Multiprocess + m_Name: '[NetworkManager] (Multiprocess)' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -695,10 +695,7 @@ MonoBehaviour: SourcePrefabToOverride: {fileID: 0} SourceHashToOverride: 0 OverridingTargetPrefab: {fileID: 0} - ReceiveTickrate: 64 - NetworkTickIntervalSec: 0.05 - MaxReceiveEventsPerTickRate: -1 - EventTickrate: 64 + TickRate: 30 ClientConnectionBufferTimeout: 10 ConnectionApproval: 0 ConnectionData: @@ -712,7 +709,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!4 &1211923376 @@ -869,9 +865,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!1 &2027640071 GameObject: diff --git a/testproject/Assets/Scenes/SampleScene.unity b/testproject/Assets/Scenes/SampleScene.unity index c0c8e3e838..7a89a0777f 100644 --- a/testproject/Assets/Scenes/SampleScene.unity +++ b/testproject/Assets/Scenes/SampleScene.unity @@ -829,7 +829,7 @@ GameObject: - component: {fileID: 620561611} - component: {fileID: 620561610} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -856,9 +856,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!114 &620561611 MonoBehaviour: @@ -898,7 +898,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!4 &620561612 diff --git a/testproject/Assets/Tests/Manual/ConnectionApproval/ConnectionApprovalTest.unity b/testproject/Assets/Tests/Manual/ConnectionApproval/ConnectionApprovalTest.unity index 233c049133..6bcdf17aa8 100644 --- a/testproject/Assets/Tests/Manual/ConnectionApproval/ConnectionApprovalTest.unity +++ b/testproject/Assets/Tests/Manual/ConnectionApproval/ConnectionApprovalTest.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -388,6 +388,7 @@ MonoBehaviour: GlobalObjectIdHash: 1327782974 AlwaysReplicateAsRoot: 0 DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 --- !u!4 &606367639 Transform: m_ObjectHideFlags: 0 @@ -500,7 +501,7 @@ GameObject: - component: {fileID: 697639107} - component: {fileID: 697639106} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -536,10 +537,7 @@ MonoBehaviour: SourcePrefabToOverride: {fileID: 0} SourceHashToOverride: 0 OverridingTargetPrefab: {fileID: 0} - ReceiveTickrate: 64 - NetworkTickIntervalSec: 0.05 - MaxReceiveEventsPerTickRate: 500 - EventTickrate: 64 + TickRate: 30 ClientConnectionBufferTimeout: 10 ConnectionApproval: 1 ConnectionData: @@ -553,7 +551,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!114 &697639107 @@ -577,9 +574,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!4 &697639108 Transform: diff --git a/testproject/Assets/Tests/Manual/ManualTestsMenu.unity b/testproject/Assets/Tests/Manual/ManualTestsMenu.unity index cfa371e60d..36a42d0221 100644 --- a/testproject/Assets/Tests/Manual/ManualTestsMenu.unity +++ b/testproject/Assets/Tests/Manual/ManualTestsMenu.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -2022,7 +2022,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: MLAPI SDK + m_Text: Netcode SDK --- !u!222 &8786710036155684099 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/testproject/Assets/Tests/Manual/NetworkSceneManagerCallbacks/SceneWeAreSwitchingFrom.unity b/testproject/Assets/Tests/Manual/NetworkSceneManagerCallbacks/SceneWeAreSwitchingFrom.unity index 789bda3a7f..25ad282b5b 100644 --- a/testproject/Assets/Tests/Manual/NetworkSceneManagerCallbacks/SceneWeAreSwitchingFrom.unity +++ b/testproject/Assets/Tests/Manual/NetworkSceneManagerCallbacks/SceneWeAreSwitchingFrom.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -363,7 +363,7 @@ GameObject: - component: {fileID: 746470209} - component: {fileID: 746470208} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -390,9 +390,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!114 &746470209 MonoBehaviour: @@ -419,10 +419,7 @@ MonoBehaviour: PlayerPrefab: {fileID: 4700706668509470175, guid: 7eeaaf9e50c0afc4dab93584a54fb0d6, type: 3} NetworkPrefabs: [] - ReceiveTickrate: 64 - NetworkTickIntervalSec: 0.05 - MaxReceiveEventsPerTickRate: 500 - EventTickrate: 64 + TickRate: 30 ClientConnectionBufferTimeout: 10 ConnectionApproval: 0 ConnectionData: @@ -436,7 +433,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!4 &746470210 @@ -586,6 +582,7 @@ MonoBehaviour: GlobalObjectIdHash: 4103035044 AlwaysReplicateAsRoot: 0 DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 --- !u!114 &1146788460 MonoBehaviour: m_ObjectHideFlags: 0 @@ -789,7 +786,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: - m_Target: {fileID: 1146788460} - m_TargetAssemblyTypeName: MLAPI.NetworkSceneManagerCallbackTests, Assembly-CSharp + m_TargetAssemblyTypeName: Netcode.NetworkSceneManagerCallbackTests, Assembly-CSharp m_MethodName: StartHost m_Mode: 1 m_Arguments: diff --git a/testproject/Assets/Tests/Manual/RpcTesting/RpcTesting.unity b/testproject/Assets/Tests/Manual/RpcTesting/RpcTesting.unity index 8abf854678..63356502de 100644 --- a/testproject/Assets/Tests/Manual/RpcTesting/RpcTesting.unity +++ b/testproject/Assets/Tests/Manual/RpcTesting/RpcTesting.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -863,6 +863,7 @@ MonoBehaviour: GlobalObjectIdHash: 1844309308 AlwaysReplicateAsRoot: 0 DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 --- !u!114 &1207168974 MonoBehaviour: m_ObjectHideFlags: 0 @@ -986,7 +987,7 @@ GameObject: - component: {fileID: 1574548686} - component: {fileID: 1574548685} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1013,9 +1014,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!114 &1574548686 MonoBehaviour: @@ -1041,10 +1042,7 @@ MonoBehaviour: PlayerPrefab: {fileID: 4700706668509470175, guid: 7eeaaf9e50c0afc4dab93584a54fb0d6, type: 3} NetworkPrefabs: [] - ReceiveTickrate: 64 - NetworkTickIntervalSec: 0.05 - MaxReceiveEventsPerTickRate: 500 - EventTickrate: 64 + TickRate: 30 ClientConnectionBufferTimeout: 10 ConnectionApproval: 0 ConnectionData: @@ -1058,7 +1056,6 @@ MonoBehaviour: NetworkIdRecycleDelay: 120 RpcHashSize: 0 LoadSceneTimeOut: 120 - EnableMessageBuffering: 1 MessageBufferTimeout: 20 EnableNetworkLogs: 1 --- !u!4 &1574548687 diff --git a/testproject/Assets/Tests/Manual/SceneTransitioning/SceneTransitioningTest.unity b/testproject/Assets/Tests/Manual/SceneTransitioning/SceneTransitioningTest.unity index b49ad92b44..25efe0cd2c 100644 --- a/testproject/Assets/Tests/Manual/SceneTransitioning/SceneTransitioningTest.unity +++ b/testproject/Assets/Tests/Manual/SceneTransitioning/SceneTransitioningTest.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.44657874, g: 0.49641275, b: 0.5748172, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -318,7 +318,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -619,7 +618,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -986,7 +984,7 @@ GameObject: - component: {fileID: 1024114719} - component: {fileID: 1024114718} m_Layer: 0 - m_Name: NetworkManager + m_Name: '[NetworkManager]' m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1063,9 +1061,9 @@ MonoBehaviour: ServerWebsocketListenPort: 8887 SupportWebsocket: 0 Channels: [] - UseMLAPIRelay: 0 - MLAPIRelayAddress: 184.72.104.138 - MLAPIRelayPort: 8888 + UseNetcodeRelay: 0 + NetcodeRelayAddress: 127.0.0.1 + NetcodeRelayPort: 8888 MessageSendMode: 0 --- !u!4 &1024114720 Transform: @@ -1232,7 +1230,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2004,7 +2001,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2336,7 +2332,6 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 From 4ee17b79cd511d79568ada00bd1160e534c1e2e0 Mon Sep 17 00:00:00 2001 From: "M. Fatih MAR" Date: Thu, 5 Aug 2021 00:25:35 +0100 Subject: [PATCH 3/3] update GameObject.Find() calls --- .../Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs | 2 +- testproject/Assets/Tests/Runtime/SceneLoadingTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs b/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs index 6fa3a56325..a2491102d0 100644 --- a/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs +++ b/testproject/Assets/Tests/Manual/HybridScripts/RpcQueueManualTests.cs @@ -164,7 +164,7 @@ private void Start() m_BeginTest = false; m_MesageSendDelay = 0.01f; - var gameObject = GameObject.Find("NetworkManager"); + var gameObject = GameObject.Find("[NetworkManager]"); if (gameObject != null) { gameObject.SetActive(false); diff --git a/testproject/Assets/Tests/Runtime/SceneLoadingTest.cs b/testproject/Assets/Tests/Runtime/SceneLoadingTest.cs index cdb85177c1..a43bdd3a55 100644 --- a/testproject/Assets/Tests/Runtime/SceneLoadingTest.cs +++ b/testproject/Assets/Tests/Runtime/SceneLoadingTest.cs @@ -69,7 +69,7 @@ public IEnumerator SceneLoading() SceneManager.sceneLoaded -= SceneManager_sceneLoaded; // Get the NetworkManager instantiated from the scene - var gameObject = GameObject.Find("NetworkManager"); + var gameObject = GameObject.Find("[NetworkManager]"); Assert.IsNotNull(gameObject); m_NetworkManager = gameObject.GetComponent();