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:
@@ -15,11 +15,11 @@ namespace Unity.Netcode.Components
|
||||
internal struct AnimationMessage : INetworkSerializable
|
||||
{
|
||||
// state hash per layer. if non-zero, then Play() this animation, skipping transitions
|
||||
public int StateHash;
|
||||
public float NormalizedTime;
|
||||
public int Layer;
|
||||
public float Weight;
|
||||
public byte[] Parameters;
|
||||
internal int StateHash;
|
||||
internal float NormalizedTime;
|
||||
internal int Layer;
|
||||
internal float Weight;
|
||||
internal byte[] Parameters;
|
||||
|
||||
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
|
||||
{
|
||||
@@ -33,8 +33,8 @@ namespace Unity.Netcode.Components
|
||||
|
||||
internal struct AnimationTriggerMessage : INetworkSerializable
|
||||
{
|
||||
public int Hash;
|
||||
public bool Reset;
|
||||
internal int Hash;
|
||||
internal bool Reset;
|
||||
|
||||
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace Unity.Netcode.Components
|
||||
private bool m_SendMessagesAllowed = false;
|
||||
|
||||
// Animators only support up to 32 params
|
||||
public static int K_MaxAnimationParams = 32;
|
||||
private const int k_MaxAnimationParams = 32;
|
||||
|
||||
private int[] m_TransitionHash;
|
||||
private int[] m_AnimationHash;
|
||||
@@ -65,21 +65,21 @@ namespace Unity.Netcode.Components
|
||||
|
||||
private unsafe struct AnimatorParamCache
|
||||
{
|
||||
public int Hash;
|
||||
public int Type;
|
||||
public fixed byte Value[4]; // this is a max size of 4 bytes
|
||||
internal int Hash;
|
||||
internal int Type;
|
||||
internal fixed byte Value[4]; // this is a max size of 4 bytes
|
||||
}
|
||||
|
||||
// 128 bytes per Animator
|
||||
private FastBufferWriter m_ParameterWriter = new FastBufferWriter(K_MaxAnimationParams * sizeof(float), Allocator.Persistent);
|
||||
private FastBufferWriter m_ParameterWriter = new FastBufferWriter(k_MaxAnimationParams * sizeof(float), Allocator.Persistent);
|
||||
private NativeArray<AnimatorParamCache> m_CachedAnimatorParameters;
|
||||
|
||||
// We cache these values because UnsafeUtility.EnumToInt uses direct IL that allows a non-boxing conversion
|
||||
private struct AnimationParamEnumWrapper
|
||||
{
|
||||
public static readonly int AnimatorControllerParameterInt;
|
||||
public static readonly int AnimatorControllerParameterFloat;
|
||||
public static readonly int AnimatorControllerParameterBool;
|
||||
internal static readonly int AnimatorControllerParameterInt;
|
||||
internal static readonly int AnimatorControllerParameterFloat;
|
||||
internal static readonly int AnimatorControllerParameterBool;
|
||||
|
||||
static AnimationParamEnumWrapper()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user