docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Field SceneMigrationSynchronization

    When enabled (the default), if a NetworkObject is migrated to a different scene (active or not) via MoveGameObjectToScene on the server side all client instances will be synchronized and the NetworkObject migrated into the newly assigned scene. The updated scene migration will get synchronized with late joining clients as well.

    Namespace: Unity.Netcode
    Assembly: solution.dll
    Syntax
    public bool SceneMigrationSynchronization
    Returns
    Type Description
    bool
    Remarks
    • This only applies to dynamically spawned NetworkObjects.
    • This only works when using integrated scene management (NetworkSceneManager). Note: You can have both ActiveSceneSynchronization and SceneMigrationSynchronization enabled. The primary difference between the two is that SceneMigrationSynchronization only synchronizes clients when the server migrates a NetworkObject to a new scene. If the scene is unloaded and DestroyWithScene is true and ActiveSceneSynchronization is false and the scene is not the currently active scene, then the NetworkObject will be destroyed.
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)