Skip to content

Commit 1c021ee

Browse files
larusjabbacakes
andauthored
Apply suggestion from @jabbacakes
Co-authored-by: Amy Reeve <amy.reeve@unity3d.com>
1 parent a544560 commit 1c021ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

com.unity.netcode.gameobjects/Documentation~/advanced-topics/serialization/inetworkserializable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public struct MyStructB : MyStructA
186186

187187
Netcode for GameObjects doesn't support generic `INetworkSerializable` types with generic `IEquatable`s when implemented as `public class NotSupported<T> : INetworkSerializable, IEquatable<NotSupported<T>>`, where the type is passed in during declaration like `NetworkVariable<NotSupported<int>> myVar;`.
188188

189-
The recommended workaround for this would be to create the generic class as usual but add a virtual method for handling the serialization of the type. Then wrap this generic `INetworkSerializable` in a derived class which then needs to have a serializable type defined where the implementation for the serialization is provided.
189+
You can work around this limitation by creating the generic class as normal and adding a virtual method for handling the serialization of the type. Then wrap the generic `INetworkSerializable` in a derived class that has a serializable type defined where the implementation for the serialization is provided.
190190

191191
For example:
192192

0 commit comments

Comments
 (0)