Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

"NetworkBehaviour cannot have generic parameters" - Why?

$
0
0
For some reason, classes that derive from NetworkBehaviour cannot have generic parameters. Why is that?
This is a showstopper for us at the moment as our MVC implementation makes use of generic parameters and we therefor cannot implement a View that is capable of using unet.

Create an empty project, create a new C# script, then paste this to get the error:

Code (CSharp):
  1. using UnityEngine.Networking;
  2.  
  3. public class NetworkTest<T> : NetworkBehaviour {
  4. }

[edit]
This is happening on...

"NetworkBehaviour cannot have generic parameters" - Why?

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>