Hello,
I have something strange which I can’t fix that ![]()
First of all, I create the Player object and after there in the his script (For example Player Controller) I want to create for his “Player Canvas” object.
What I did (In the script PlayerController which on the Player):
private void Start()
{
GameObject pCanvas = PhotonNetwork.Instantiate(“Player Canvas”, Vector3.zero, Quaternion.identity, 0);
playerCanvas = pCanvas.GetComponent();
playerCanvas.Initiate(gameObject.transform, pView.owner.name);
if (pView.isMine)
pCanvas.transform.GetChild(0).GetComponent().ActiveChatInputField();
}
The problem is when I’m as master joined to the room, all works fine. But, When the client is connects to the room, I see two more objects.
I want to see only one object which have “Player1_UI (The Player Canvas object)” for every Player.
What happens in the scene (objects): “Master, Master_UI”, “Client, Client_UI”, and more two objects “Player Canvas(Clone), Player Canvas(Clone)”.
For example what I want to will happen in the scene (objects): “Master, Master_UI”, “Client, Client_UI”, Without these two objects (“Player Canvas(Clone)”).
When the master is alone:
And when the client connects:
What I did wrong?
I hope you understand me.
Thanks! ![]()