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.
Inherited Members
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 |