docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HostMigrationData

    Host migration class used to access the host migration system, like getting the host migration data blob and deploying migration data to a new world.

    Inheritance
    object
    HostMigrationData
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.NetCode.HostMigration
    Assembly: Unity.NetCode.dll
    Syntax
    public static class HostMigrationData

    Methods

    Get(World, ref NativeList<byte>)

    Get the host migration data which has been collected by the host migration system. There is no limit enforced on the total size of the migration data.

    Declaration
    public static void Get(World fromWorld, ref NativeList<byte> toData)
    Parameters
    Type Name Description
    World fromWorld

    The world where the migration data is stored

    NativeList<byte> toData

    Destination list to copy the data, this will be resized if it is too small to store all the data

    Set(in NativeArray<byte>, World)

    Deploy the given host migration data in the given world. The data needs to be collected by Get(World, ref NativeList<byte>) and contains all the ghost data and specific host configuration data needed to set up the netcode state.

    Declaration
    public static void Set(in NativeArray<byte> fromData, World toWorld)
    Parameters
    Type Name Description
    NativeArray<byte> fromData

    Host migration data collected by the host migration system

    World toWorld

    Destination world to deploy the migration data

    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)