docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DriverMigrationSystem

    A system that should be used to temporarly keep the internal transport connections alive while transferring then to another world. For example, you can rely on the DriverMigrationSystem to re-use the same connections in between a lobby world and the game world.

    Inheritance
    object
    ComponentSystemBase
    SystemBase
    DriverMigrationSystem
    Inherited Members
    SystemBase.CompleteDependency()
    SystemBase.Update()
    SystemBase.GetComponent<T>(Entity)
    SystemBase.SetComponent<T>(Entity, T)
    SystemBase.HasComponent<T>(Entity)
    SystemBase.HasBuffer<T>(Entity)
    SystemBase.GetComponentLookup<T>(bool)
    SystemBase.GetComponentDataFromEntity<T>(bool)
    SystemBase.GetBuffer<T>(Entity, bool)
    SystemBase.GetBufferLookup<T>(bool)
    SystemBase.GetBufferFromEntity<T>(bool)
    SystemBase.GetEntityStorageInfoLookup()
    SystemBase.GetStorageInfoFromEntity()
    SystemBase.Exists(Entity)
    SystemBase.Dependency
    SystemBase.CheckedStateRef
    SystemBase.Entities
    SystemBase.Job
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetComponentTypeHandle<T>(bool)
    ComponentSystemBase.GetDynamicComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetBufferTypeHandle<T>(bool)
    ComponentSystemBase.GetSharedComponentTypeHandle<T>()
    ComponentSystemBase.GetDynamicSharedComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetEntityTypeHandle()
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireAnyForUpdate(params EntityQuery[])
    ComponentSystemBase.RequireAnyForUpdate(NativeArray<EntityQuery>)
    ComponentSystemBase.RequireForUpdate<T>()
    ComponentSystemBase.RequireSingletonForUpdate<T>()
    ComponentSystemBase.HasSingleton<T>()
    ComponentSystemBase.GetSingleton<T>()
    ComponentSystemBase.GetSingletonRW<T>()
    ComponentSystemBase.GetSingletonBuffer<T>(bool)
    ComponentSystemBase.TryGetSingleton<T>(out T)
    ComponentSystemBase.TryGetSingletonBuffer<T>(out DynamicBuffer<T>)
    ComponentSystemBase.SetSingleton<T>(T)
    ComponentSystemBase.GetSingletonEntity<T>()
    ComponentSystemBase.TryGetSingletonEntity<T>(out Entity)
    ComponentSystemBase.GetEntityQuery(params ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(params EntityQueryDesc[])
    ComponentSystemBase.GetEntityQuery(in EntityQueryBuilder)
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.SystemHandle
    ComponentSystemBase.SystemHandleUntyped
    ComponentSystemBase.Time
    ComponentSystemBase.WorldUpdateAllocator
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    [DisableAutoCreation]
    [WorldSystemFilter(WorldSystemFilterFlags.LocalSimulation, WorldSystemFilterFlags.Default)]
    public class DriverMigrationSystem : SystemBase

    Methods

    LoadWorld(int, 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
    int 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.

    Exceptions
    Type Condition
    ArgumentException

    Is thrown incase a invalid world is supplied. Only Netcode worlds work.

    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
    int

    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.

    In This Article
    Back to top
    Copyright © 2025 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)