Search Unity

Getting aggravated about observers/Commands/etc should I just use Send for everything?

Discussion in 'Multiplayer' started by gsus725, Aug 31, 2017.

  1. gsus725

    gsus725

    Joined:
    Aug 23, 2010
    Posts:
    250
    Hello I am getting a bit stressed trying to get NetworkIdentity.observers / RebuildObservers / Commands / ClientRpc / SyncVars / etc to work together. I'm almost feeling like it would be easier to just use Send() for everything in the game, and control who receives each message myself.

    Would that be a problem? Is that what a professional game should be doing in the first place? Using Send() for just about everything and avoiding SyncVars / Commands / etc?
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    In fact, it's better than using SyncVars, SyncLists etc. If you're willing to write your own handlers, and you're fine with the additional time spent on writing and wiring them - it's worth it. Because it gives you additional control over serialization over the network.

    UnetWeaver basicly does the same thing. Flaw is - there isn't a way to properly debug generated code. So there is that. Also, no easy way to understand what serialized how. Unless you know how it's serialized via source code.

    I'd say using Messages and Send() is less human error prone, since most of the time you can just debug and see what's going on.

    If you like Send() more, I suggest using it. As I would for sure.