feat: Support for generic NetworkBehaviour types, and fix: issues with domain reload/scene reload being disabled by ShadauxCat · Pull Request #2720 · Unity-Technologies/com.unity.netcode.gameobjects
…h domain reload/scene reload being disabled (#2720) Adds support for generic network behaviours, as well as for serializing generic types in RPCs (so long as the type is defined on the behaviour and not on the RPC itself; which is to say, this is supported: ```csharp public class Foo<T> : NetworkBehaviour { [ServerRpc] public void MyServerRpc(T val) {} } ``` But this is not: ```csharp public class Foo : NetworkBehaviour { [ServerRpc] public void MyServerRpc<T>(T val) {} } ``` As in the former case, when the class is instantiated, it knows what T is and there is only one version of the RPC per class, while the latter case would require much more significant plumbing for runtime type identification of RPC parameters in order to be able to instantiate the RPC correctly on the receiving side.) In fixing this, the majority of the issues with domain reload were also fixed coincidentally, so I went ahead and fixed the couple of remaining issues as well.