Greetings,
Great, I can synchronize several Network Views with this !
Why ? I thought RPC neither require state synchronization, nor the observed field?
Must the prefab I want to Object.Instantiate really have something in the observed property ?
Greetings,
Great, I can synchronize several Network Views with this !
Why ? I thought RPC neither require state synchronization, nor the observed field?
Must the prefab I want to Object.Instantiate really have something in the observed property ?
It doesn’t require either. I only have one object in my entire project that actually has the fields filled for the network view. Everything else doesn’t have state synchro or observed scripts or anything, and it works fine. You do require a network view on an object in order for scripts within it to send/receive rpc calls though.
?
But were they already existing in your scene ? Or did you Network.Instantiate them ? Or Object.Instantiate + Network.AllocateViewID to synchronize them ?
That would the second time I quote something from the Unity manual that is wrong (and again, the Network) ? I hope there are not too many errors, the Network section is enough complex without the false infos :shock:
Anyway, yes, from what I understood, gameObjects with Network Views with similar Network View ID are required to communicate between them.
Well, if you are right, thanks you for your info ._.
yeah, I network.instantiate them. Works fine.
So they are already synchronized, you don’t need Network.AllocateViewID. I am talking about the case of gameObjects made by Object.Instantiate (like in the script example, in the URL), that require sync (case complicated)
I wonder why AllocateViewID would require all this strange prerequisites :?
If you’re just doing Instantiate locally, then you need to do all the fun allocation and stuff. I really don’t see why that would need to be the case though. I’ve heard you can run into bugs and stuff if using Network.Instantiate, but I suppose everything I’ve done so far is simple enough to not have those issues.
Well, I heard from someone that heard from someone that…that there could be bugs. But no one is truly confirming these facts. Are those people dead…?
No, the bugs probably do exist. I’ve run into some strange errors before, but it usually only happens when I Network.Destroy Network.Instantiate’d things. However, this doesn’t really do anything to my game other than fill up the error log because the objects are destroyed and not going to do anyhing else anyway.