Sync String Array
Options
I need to sync a string array in Photon PUN2 (Unity), so all the players can have the same value, for example:
The master player sets the string order to a random order and the string array value is the same for all players. I have tried with RPC, RaiseEvent and SerializeView, but nothing has really worked. Could you please help me? Thanks
The master player sets the string order to a random order and the string array value is the same for all players. I have tried with RPC, RaiseEvent and SerializeView, but nothing has really worked. Could you please help me? Thanks
0
Comments
-
It seems you can send an array if you cast it into an object before sending it.
photonView.RPC("SetArrayRPC", PhotonTargets.All, (object)m_array); [PunRPC] private void SetArrayRPC(string[] array) { m_myArray = array; }
0