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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

All (network) objects being destroyed when "host" leaves?

Discussion in 'Multiplayer' started by carmine, Mar 28, 2016.

  1. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    I can create a match, join, it, everything syncs. Life is good.

    However, it seems when the "host" or creator of the match leaves, it destroys all of the NetworkObjects (even other players).

    Is there something I'm missing here? Obviously if the host leaves the match I don't want to just destroy everything.

    I basically want to destroy just the host's (player), as well as potentially transfer any ownership of some objects to the new host.
     
  2. Comolokko

    Comolokko

    Joined:
    Jul 24, 2014
    Posts:
    28
    I have the same problem. If you find a solution, share it here please :)
     
  3. UnityUser9860

    UnityUser9860

    Joined:
    Dec 8, 2015
    Posts:
    179
    you could try having a text file created when ever the server shuts down with all objects states and then every time its put online it reads the file and spawns everything @LordPhill will be able to help you with the code :D hope this helps