Trouble with NetworkDriver.Create in Unity Networking
15. Květen 2024 v 15:52
I'm encountering an issue while using the NetworkDriver.Create
method in Unity Networking and I could use some assistance.
Here's the code snippet where I'm facing the problem:
s_networkDriver = NetworkDriver.Create(new ReliableUtility.Parameters { WindowSize = 32 });
Whenever I run this line, I receive the following error:
error CS0315: The type 'Unity.Networking.Transport.Utilities.ReliableUtility.Parameters' cannot be used as type parameter 'N' in the generic type or method 'NetworkDriver.Create<N>(N)'. There is no boxing conversion from 'Unity.Networking.Transport.Utilities.ReliableUtility.Parameters' to 'Unity.Networking.Transport.INetworkInterface'.
I'm not entirely sure what this error means or how to resolve it. Can someone please provide some guidance on how to properly use NetworkDriver.Create
in Unity Networking?