Image fillAmount Photon
Options
Hello everyone. I have a picture as a health scale. I’m filling out health through the image.fillAmount. How can i do this serialization in PUN?
0
Comments
-
Hi,
Several approach you can use here. One of these:public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) { if (stream.IsWriting) { stream.SendNext(image.fillAmount); } else { image.fillAmount = (float)stream.ReceiveNext(); } }
Other option is send RPC when your health value changed.0 -
Hi,
Several approach you can use here. One of these:public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) { if (stream.IsWriting) { stream.SendNext(image.fillAmount); } else { image.fillAmount = (float)stream.ReceiveNext(); } }
Other option is send RPC when your health value changed.
Thank!!! it solved my problem0