instantiating player visible in the masterclient only but not visible in the client side ?

Hello All
i am new to photon still
i am trying to Instantiate the player for every Side in the Game
i have two sides only imageproble" alt="" />

Host and client
when Host or client join the room
the player instantiaiting well
but the problem is
two player is visible only in Host Side
in client side the only visible is client player
the host player doesn't visible in the client side
any solution
thanks !

Comments

  • Hi @MostafaYahia,

    is there any scene loading in the game? Most of the described problems similar to your issue are a result of scene loading.

    If there is scene loading in the game, please add Debug.Log calls to the Awake / Start and the OnDestroy function to a script attached to the player object. Please also add a Debug.Log call to an empty GameObject in the second (game) scene. Afterwards check the messages logged to the console and see, if a player's object is created before the new scene is loaded. Please also try to change the roles of the MasterClient and the other client (run MasterClient as standalone build and the other client in the Unity Editor). Afterwards check the logs in the console again.

    If this a problem with scene loading, you can try to mark the player objects as DontDestroyOnLoad. This way they won't get destroyed on scene loading automatically.
  • Actually this instantiation happening in the Awake of empty game object of the current scene
    so when the players in enter this scene
    the empty game object
    has script in Awake function
    i am asking to instantiate the player
  • any help ! ?