Photon instantiates too many Players and Scene Objects

Options
Hey, currently i'm working on a networking problem i faced this week. My room has a max. player setting of 2 Players, set through:
PhotonNetwork.CreateRoom(null, new RoomOptions() { MaxPlayers = 2 }, null);

Also there are two objects that are loaded into the scene through:
if (PhotonNetwork.isMasterClient) {
    PhotonNetwork.InstantiateSceneObject (this.cube.name, new Vector3 (0.5f, 0.5f, 0.5f), Quaternion.identity, 0, null);
    PhotonNetwork.InstantiateSceneObject (this.cube.name, new Vector3 (2f, 0.5f, 0.5f), Quaternion.identity, 0, null);
}
Now when 1 player connects, everything seems fine (one player and two loaded scene objects) (as seen in the hierarchy)
When the second player joins, there are 3 players and four scene objects. I can't see the third player, since it's just a camera but it's visible in the hierarchy. The two extra objects are also just seen on the second joined player.

Comments

  • OguzhanHalil
    edited June 2017
    Options
    Hey ichitala,
    Could you write down where is code lines ?