docs.unity3d.com
    Show / Hide Table of Contents

    Class DriverMigrationSystem

    Inheritance
    Object
    DriverMigrationSystem
    Namespace: Unity.NetCode
    Syntax
    public class DriverMigrationSystem : SystemBase

    Methods

    LoadWorld(Int32, World)

    Loads a stored NetworkDriver and Connection data into a new or existing World.

    Declaration
    public World LoadWorld(int ticket, World newWorld = null)
    Parameters
    Type Name Description
    Int32 ticket

    A ticket to a stored World

    World newWorld

    An optional world we would want to Load into.

    Returns
    Type Description
    World

    A prepared world that is ready to have its systems added.

    Remarks

    This function needs to be called before any systems are initialized on the world we want to migrate to.

    OnCreate()

    Declaration
    protected override void OnCreate()

    OnDestroy()

    Declaration
    protected override void OnDestroy()

    OnUpdate()

    Declaration
    protected override void OnUpdate()

    StoreWorld(World)

    Stores NetworkDriver and Connection data for migration of a specific world.

    Declaration
    public int StoreWorld(World sourceWorld)
    Parameters
    Type Name Description
    World sourceWorld

    The world we want to store.

    Returns
    Type Description
    Int32

    A ticket that can be used to retrieve the stored NetworkDriver data.

    Remarks

    Only entities with the type NetworkStreamConnection are migrated over to the new World.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023