Support for NetworkBehaviour
Hi there,
I'm evaluating Odin for our multiplayer project and found that while support for MonoBehaviours and ScriptableObjects is present and really awesome, NetworkBehaviour does not seem to be included. Can you tell me if you have any plans of supporting it and if yes, whats the ETA?
Cheers, André
Comments (7)
-
-
- changed status to open
-
reporter Hi Tor,
great to hear! Would be glad to help you testing it...sending you my mail. Cheers!
-
reporter regarding SyncVars...I understand that only a few types are supported by Unity. From the docs:
The allowed SyncVar types are;
• Basic type (byte, int, float, string, UInt64, etc) • Built-in Unity math type (Vector3, Quaternion, etc), • Structs containing allowable types .
https://docs.unity3d.com/ScriptReference/Networking.SyncVarAttribute.html
-
I sent you a build for testing - please let me know how it goes.
-
reporter works like a charm so far! :) Tested with C# 4.6 in Unity 2017.1 and everything works, also all SyncVar types, including structs Thank you!
-
- changed status to resolved
Great to hear! I'll mark this as resolved, then - do let us know if any issues crop up though.
- Log in to comment
Yeah, NetworkBehaviour isn't quite supported by Odin yet, due to its peculiar behaviour. SyncVars and the custom editor stuff means it's full of special cases.
This is definitely on the list of things that we're going to look into - however, unlike other Unity types, this one will need a bunch of custom support. Actually, since we now have someone who considers it a blocking issue, I'll dedicate a few hours today towards seeing whether I can quickly hammer out support for NetworkBehaviour. So far, we've just done some preliminary testing and concluded that it will probably be pretty troublesome. If it proves to be easier than expected, I'll note it in here when I'm done, and if you can then send me a mail at tor@sirenix.net with your Asset Store invoice number, then I'll send you a build with support included - then you can test it out for any possible issues I didn't catch and we'll work from there, as we don't currently have any comprehensive networking tests set up.
I should note that, even when we do come to support this with things like SerializedNetworkBehaviour, [SyncVar] will not change - it will still only support the same basic types being synced. Odin's serialization will not automatically augment what can be synced over the network. You will however be able to use Odin's serialization for non-synced members, and even without the serialization, you will of course be able to use Odin's attributes for tweaking the editor itself.