PHOTON ENEMIES SCENE GLOBAL

Hi guys, when I connect a room and the enemies are spawned before per other player the enemies don't appear for me just for other player for spawned the enemies don't do part of the scene global but I use:
PhotonNetwork.automaticallySyncScene = true;
GameObject enemie= PhotonNetwork.InstantiateSceneObject ("zombieEasy", new Vector3(200, 2, 200), Quaternion.identity, 0, null) as GameObject;
It only appears to players who were present at the time of birth, but does not appear to those who later enter the room. Will I have to put some Update () mode script to update the enemies? Or JoinRoom () {Update enemies} ??

Comments

  • =/
  • Hi @TyHover,

    PhotonNetwork.InstantiateSceneObject(...) will be executed properly when called by the MasterClient, only. Hope you had that in mind.

    Besides that PhotonNetwork.InstantiateSceneObject(...) is a buffered call on the server, means that late-joining clients will also receive these calls unless the associated game objects get destroyed before. Means that this should work out of the box, you don't have to do additional implementation or function calls.

    Do you have this issue every time testing this scenario or does it just happen sometimes, irregularly. Which version of PUN and which version of Unity to you currently use?
  • Unity 5.5.1, PUN v1.81

    If the players are together the enemies appear to the two players but if a player enters after the enemies were born appears only to the player who was inside the room.
  • Christian_SimonChristian_Simon ✭✭✭
    edited June 19
    Please try updating to the latest PUN version, currently 1.84.1, and check if this issue still appears.

    If it still appears, please let us know and tells us how to reproduce this issue. I did a quick check on this and everything works as expected, no unwanted behaviour.
  • TyHoverTyHover
    edited June 19
    the error continue, I gonna record a video, for more details
  • here the video ->
  • =/
Sign In or Register to comment.