- Home /
Photon Text Update
Hello, my problem is that i dont know how to start with my idea. I have two texts one is the text named "MyCounter" the other one "EnemyCounter". My Problem is now that i dont know how i can update the EnemyCounter because i need his number (his "MyCounter")
void Update()
{
if(photonView.isMine)
{
if (Input.GetMouseButtonUp(0))
{
number -= 1;
MyCounter.text = "Counter " + number;
Debug.Log("Clicked");
}
}
}
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if(stream.isWriting) { Debug.Log("Streamed"); stream.SendNext(MyCounter.text); }
else { MyCounter.text = (string)stream.ReceiveNext(); }
}
This is my Code for the MyCounter now, how can i update the EnemyCounter if the Enemy Clicks? I already thought about MyCounter==EnemyCounter but at the end i would have the same number, so i need access of the other players number. How can i do that?
Your answer
Follow this Question
Related Questions
Photon Multiplayer - nick above model head, I have no idea how to repair it 1 Answer
[PUN2] Problem at pushing the other players 1 Answer
The player who leaves second is not being able to create or join room - Unity Photon Network 2 Answers
Is that any way to pass list of array through photon? 0 Answers