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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug NetworkObject destroyed without apparent reason

Discussion in 'Netcode for GameObjects' started by AnKOu, Jul 23, 2021.

  1. AnKOu

    AnKOu

    Joined:
    Aug 30, 2013
    Posts:
    118
    Hello !

    I have an issue where scene NetworkObject get destroyed on connection.

    I found out that it was a call to NetworkSpawnManager::CleanDiffedSceneObjects() which destroy them.

    The list used by this method to destroy those gameObject is filled in NetworkSpawnManager::ClientCollectSoftSyncSceneObjectSweep(). Apparently, all the scene NetworkObject whose IsSceneObject property is null are added to the list.

    When looking in the source of NetworkObject, it says that
    So my question is why those 6 NetworkObject aren't spawned like their 164 siblings in the same scene ?
    Given the fact that I start the client after waiting for the server to be fully started and that on the server, those NetworkObject are indicated as spawned.

    Do you think this is a bug ? Should I report it ?