Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Pun Unity Destroys GameObject when player left the network before transferring the Ownership

Discussion in 'Multiplayer' started by vickypicattolabs, Jan 19, 2024.

  1. vickypicattolabs

    vickypicattolabs

    Joined:
    Nov 16, 2023
    Posts:
    1
    Hi all
    I am new to photon networking in unity. I am creating a multiplayer BoardGame.

    I am Instantiating the GameBoard as single Gameobject in the network. So that it can be synchronized to all the players in the network.

    Problem is when the player who instantiated the GameBoard lefts the scene it automatically destroys the GameBoard before it was transferred to other player in the network.

    I even tried roomOptions.CleanupCacheOnLeave set to false. But it leaves many photonviews of the player who left the network. So identifying and deleting those will be a huge process too.

    Is there anyway to transfer the instantiated gameobject of a player to another player when the instantiated player left the room ?