Hi,
I have a very basic but correctly working multiplayer non authoritative setting based on the official material.
I have the need to perform some specific client side actions on a gameobject, and I’m considering the RPC approach (for ease of implementation).
I have the following need:
1 - A gameobject (called A) performs an action that adds a component to it
2 - the gameobject A sends an RPC to the others telling that he has added the
component
3 - the other gameobjects update their local copy of A, adding the component to A
(for example determining its class from a variable name)
4 - ?
5 - profit!
besides point 4, about which I’ll worry about in the future, I can’t for the life of me figure how to correctly implement point 3, and tell the ‘others’ that SPECIFICALLY gameobject A has added the component.
I mean, surely you can identify a ‘player’ thanks to the RPC parameters, but what’s the way to associate a player with its multiplayer gameobjects?
I was hoping for something like
Gameobject[] networkplayergameobjects = Gameobject.Find(Network.player);
so that i could iterate and find by name, for example, but sadly there’s no such thing.
Any help is appreciated.