Callback for PhotonNetwork.Instantiate

Options

I was working on the multiplayer game in which a maximum of 2 players was allowed to join in the same room and for this purpose, I was using Photon Network.

Now as per my requirements I was spawning symbols using PhotonNetwork.Instantiate() method and here you have my actual code:

Now if you notice, I was adding spawned Symbol within SymbolObjList which was working perfectly for the Host player but not with another Client player.

As per my game requirements, I want my SymbolObjList to be filled with symbols of Host and Client players on each side.

For Host player, it is already filling but for Client Player, I want some callback so I can add items in the list for Client Player.

Please suggest to me something on this matter.

Answers

  • DELOG
    Options

    Hello, you should use [PunRPC] for this task.

    So, you firstly choose, what to add(gameObject or what you want) on MasterClient and after that you must call RPC for adding this on other clients.

    check how to use RPC and you will understand how solve the problem. if not, i will try to help you.