Open wintbiit opened 1 week ago
In order to avoid adding a dependency on the Collections package, the support for those collections is hidden behind a project define. You have to add UNITY_NETCODE_NATIVE_COLLECTION_SUPPORT
to your project defines (project settings > player > scripting define symbols).
NGO v1.9.1 Unity 2022.3.22f1
as release blog says, NetworkVariable now includes built-in support for
NativeHashMap
by #2813 , but how to use it?Here is my NetworkBehaviour code:
However when spawn this NetworkObject I received error:
Obviously cannot add a
[GenerateSerializationForType(typeof(NetworkVariable<NativeHashMap<int, NativeArray<byte>>>))]
to fix this. So what's proper way to use NetworkVariable with NativeHashMap and etc mentioned in release blog?