pooling in PhotonNetwork
how to make pooling objects in photonnetwork ?
0
Best Answer
-
Hi, lets say one Client instantiates 20 GameObjects each has a PhotonView Component , u could store each PhotonViewID in an int[] array and send them, with a RPC to all clients.The Clients has to find each GameObject (PhotonView.Find(id).gameObject) store them in a List<GamObject>() or us a Dictionary with int(id),GameObject. To activate or deactivate just make an RPC wich send the photonViewID and some infos like bool to activate or deactive it.Each client then can take a look for this id and deactivate/activate the object.5
Answers
-
Hi, lets say one Client instantiates 20 GameObjects each has a PhotonView Component , u could store each PhotonViewID in an int[] array and send them, with a RPC to all clients.The Clients has to find each GameObject (PhotonView.Find(id).gameObject) store them in a List<GamObject>() or us a Dictionary with int(id),GameObject. To activate or deactivate just make an RPC wich send the photonViewID and some infos like bool to activate or deactive it.Each client then can take a look for this id and deactivate/activate the object.5