I get this warning / error of “ClientRpc call on un-spawned object” when I try to call a ClientRpc on a nested NetworkBehaviour. That is, I have a root object A, which has a NetworkIdentity which is spawned by the server using Network.Spawn(). However, A, has a child B, which has a NetworkIdentity and a NetworkBehaviour script. I am trying to call a ClientRpc on B, but I get that error / warning and the Rpc is not delivered.
I don’t really want to put all of my code on A for organizational / object oriented reasons. Is this an expected problem?
Just realized I had a typo in my title (wrote “DroneBehaviour” which is a game script of mine instead of “NetworkBehaviour”)… fixed the title so maybe more people will check. Unfortunately no, I have no solution to this other than to re-organize code in such a way that is counter to normal object oriented principles I would typically use :(.
I have similar issue, except for my need I have ship object, and modules which all are networkbehaviours - as they can be destroyed separately and then de-attached.
There are ways to work this around, but that’d be MESS.
In Unity 5.2 there will be multiple player objects per player, and that could solve this issue. Idk how will it work, but even if it’ll have to be set up for each module separately on the server, it’d be easier already I suppose.
And for now I just wait and slowly work on other things that don’t require this functionality.