Question by
epameinondaspanos · Apr 21 at 12:48 PM ·
randomphotonrandom.rangesynchronizationpun
Randomize a value through Photon
So I am trying to make a gamemode like hexagon heat in Photon. But every time I play, each user has a different color randomized. So what I am trying to do is to synchronize the color value for both players through Photon.
private void Sink() { safe = Random.Range(0, platforms.childCount); indicator.color = platforms.GetChild(safe).GetComponent<SpriteRenderer>().color; StartCoroutine(waitForSink()); }
In this void I randomize which color is going to get picked and set the indicators color to the randomized color and then start a coroutine.
Can someone please tell me how to synchronize the SAFE value so every user has the same value. Thanks in advance.
BTW using Photon Pun2
Comment