Hello!
Reading the documentation, DriverMigrationSystem is used to migrate between worlds while maintaining a connection.
When I attempt to use this system on the client, I get some issues.
I tried using a similar setup the documentation described, and it does not seem to work properly.
DriverMigrationSystem migrationSystem = default;
foreach (var world in World.All)
{
if ((migrationSystem = world.GetExistingSystemManaged<DriverMigrationSystem>()) != null)
break;
}
var source = NetcodeBootstrap.ClientWorld;
var ticket = migrationSystem.StoreWorld(source);
source.Dispose();
var newWorld = migrationSystem.LoadWorld(ticket);
setup.InitializeClientWorld(newWorld);
At first I got a null reference error, so I checked, DriverMigrationSystem is not automatically added.
Without much more detail in the docs, I assumed I just needed to add the system when I create the world.
After doing that, the error was solved, but I get a new error:
ApplicationException: The driver contains no valid BackupWorld to migrate from.
Not sure where to go from here, thought of doing it manually by moving network entities myself to the new world, but I don't know what entities are required to do this.
Any ideas?
For reference:
https://docs.unity3d.com/Packages/com.unity.netcode@1.11/manual/client-server-worlds.html#world-migration