docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Field PostSynchronizationSceneUnloading

    When enabled and ClientSynchronizationMode is Additive, any scenes not synchronized with the server will be unloaded unless VerifySceneBeforeUnloading returns true. This provides more granular control over which already loaded client-side scenes not synchronized with the server should be unloaded.

    Namespace: Unity.Netcode
    Assembly: solution.dll
    Syntax
    public bool PostSynchronizationSceneUnloading
    Returns
    Type Description
    bool
    Remarks

    If the VerifySceneBeforeUnloading delegate callback is not set then any scene loaded on the just synchronized client will be unloaded. One scenario is a synchronized client is disconnected for unexpected reasons and attempts to reconnect to the same network session but still has all scenes that were loaded through server synchronization (initially or through scene events). However, during the client disconnection period the server unloads one (or more) of the scenes loaded and as such the reconnecting client could still have the now unloaded scenes still loaded. Enabling this flag coupled with assignment of the assignment of the VerifySceneBeforeUnloading delegate callback provides you with the ability to keep scenes loaded by the client (i.e. UI etc) while discarding any artifact scenes that no longer need to be loaded.

    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)