Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Third Party Photon, Problem with instantiation

Discussion in 'Multiplayer' started by alextoti33, Apr 8, 2019.

  1. alextoti33

    alextoti33

    Joined:
    Oct 8, 2017
    Posts:
    65
  2. alextoti33

    alextoti33

    Joined:
    Oct 8, 2017
    Posts:
    65
  3. Trqncescqpe

    Trqncescqpe

    Joined:
    Jul 9, 2017
    Posts:
    2
    Hello,

    1. You have 2 scripts that respond to OnPlayerEnteredRoom call back with a spawn player : GameManager and Network Manager.
    2. You have multiple if (photonView.IsMine). Maybe the problem is there

    Code (CSharp):
    1.  
    2.         if (photonView.IsMine)
    3.             GetComponent<SpriteRenderer>().color = Color.green;
    4.         this.actorNumber = actorNumber;
    5.         nameText.text = name;
    6.         if (photonView.IsMine)
    7.             GameManager.getInstance.UpdateSceneCam(false);