com.unity.netcode.gameobjects@1.0.0-pre.8
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). ## [1.0.0-pre.8] - 2022-04-27 ### Changed - `unmanaged` structs are no longer universally accepted as RPC parameters because some structs (i.e., structs with pointers in them, such as `NativeList<T>`) can't be supported by the default memcpy struct serializer. Structs that are intended to be serialized across the network must add `INetworkSerializeByMemcpy` to the interface list (i.e., `struct Foo : INetworkSerializeByMemcpy`). This interface is empty and just serves to mark the struct as compatible with memcpy serialization. For external structs you can't edit, you can pass them to RPCs by wrapping them in `ForceNetworkSerializeByMemcpy<T>`. (#1901) ### Removed - Removed `SIPTransport` (#1870) - Removed `ClientNetworkTransform` from the package samples and moved to Boss Room's Utilities package which can be found [here](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/main/Packages/com.unity.multiplayer.samples.coop/Utilities/Net/ClientAuthority/ClientNetworkTransform.cs). ### Fixed - Fixed `NetworkTransform` generating false positive rotation delta checks when rolling over between 0 and 360 degrees. (#1890) - Fixed client throwing an exception if it has messages in the outbound queue when processing the `NetworkEvent.Disconnect` event and is using UTP. (#1884) - Fixed issue during client synchronization if 'ValidateSceneBeforeLoading' returned false it would halt the client synchronization process resulting in a client that was approved but not synchronized or fully connected with the server. (#1883) - Fixed an issue where UNetTransport.StartServer would return success even if the underlying transport failed to start (#854) - Passing generic types to RPCs no longer causes a native crash (#1901) - Fixed an issue where calling `Shutdown` on a `NetworkManager` that was already shut down would cause an immediate shutdown the next time it was started (basically the fix makes `Shutdown` idempotent). (#1877)
This commit is contained in:
@@ -79,6 +79,15 @@ namespace Unity.Netcode.TestHelpers.Runtime
|
||||
protected const uint k_DefaultTickRate = 30;
|
||||
protected abstract int NumberOfClients { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Set this to false to create the clients first.
|
||||
/// Note: If you are using scene placed NetworkObjects or doing any form of scene testing and
|
||||
/// get prefab hash id "soft synchronization" errors, then set this to false and run your test
|
||||
/// again. This is a work-around until we can resolve some issues with NetworkManagerOwner and
|
||||
/// NetworkManager.Singleton.
|
||||
/// </summary>
|
||||
protected bool m_CreateServerFirst = true;
|
||||
|
||||
public enum NetworkManagerInstatiationMode
|
||||
{
|
||||
PerTest, // This will create and destroy new NetworkManagers for each test within a child derived class
|
||||
@@ -108,8 +117,6 @@ namespace Unity.Netcode.TestHelpers.Runtime
|
||||
protected bool m_UseHost = true;
|
||||
protected int m_TargetFrameRate = 60;
|
||||
|
||||
protected NetcodeIntegrationTestHelpers.InstanceTransport m_NetworkTransport = NetcodeIntegrationTestHelpers.InstanceTransport.SIP;
|
||||
|
||||
private NetworkManagerInstatiationMode m_NetworkManagerInstatiationMode;
|
||||
|
||||
private bool m_EnableVerboseDebug;
|
||||
@@ -252,7 +259,7 @@ namespace Unity.Netcode.TestHelpers.Runtime
|
||||
CreatePlayerPrefab();
|
||||
|
||||
// Create multiple NetworkManager instances
|
||||
if (!NetcodeIntegrationTestHelpers.Create(numberOfClients, out NetworkManager server, out NetworkManager[] clients, m_TargetFrameRate, m_NetworkTransport))
|
||||
if (!NetcodeIntegrationTestHelpers.Create(numberOfClients, out NetworkManager server, out NetworkManager[] clients, m_TargetFrameRate, m_CreateServerFirst))
|
||||
{
|
||||
Debug.LogError("Failed to create instances");
|
||||
Assert.Fail("Failed to create instances");
|
||||
@@ -558,6 +565,7 @@ namespace Unity.Netcode.TestHelpers.Runtime
|
||||
}
|
||||
if (CanDestroyNetworkObject(networkObject))
|
||||
{
|
||||
networkObject.NetworkManagerOwner = m_ServerNetworkManager;
|
||||
// Destroy the GameObject that holds the NetworkObject component
|
||||
Object.DestroyImmediate(networkObject.gameObject);
|
||||
}
|
||||
@@ -668,6 +676,7 @@ namespace Unity.Netcode.TestHelpers.Runtime
|
||||
var gameObject = new GameObject();
|
||||
gameObject.name = baseName;
|
||||
var networkObject = gameObject.AddComponent<NetworkObject>();
|
||||
networkObject.NetworkManagerOwner = m_ServerNetworkManager;
|
||||
NetcodeIntegrationTestHelpers.MakeNetworkObjectTestPrefab(networkObject);
|
||||
var networkPrefab = new NetworkPrefab() { Prefab = gameObject };
|
||||
m_ServerNetworkManager.NetworkConfig.NetworkPrefabs.Add(networkPrefab);
|
||||
|
||||
Reference in New Issue
Block a user