Host migration snapshot is almost empty. What can be the problem?

Options

Hey guys! We are trying to implement host migration in our game and faced a problem with host migration snapshot, which seems to contain only 1 networkObject no matter what.

Our level loading flow, after the room is filled with players is like that:

  • Spawn gameplayContext (a network prefab with some top-level gameplay init logic) using Runner.Spawn
  • Load game level scene additively, then call RegisterSceneObjects for all scene networkObject
  • Spawn player character network objects for all players using Runner.Spawn

So, this flow works fine and all the network objects are synced properly during gameplay. But now, when we are trying to implement host migration - the snapshot we receiving always contains only 1 object (which is the first one spawned - gameplayContext, mentioned earlier).

So, the main question is - why out migration snapshot does no include most of the loaded objects, despite those objects are synced properly before host migration happens?

Maybe we missed some additional registration step for those objects? Or we need to call migration snapshot creation manually? (We are currently set snapshot interval for 5 secs for testing purpose)

We are using fusion 1.1.3 build 589

Answers

  • ramonmelo
    Options

    Hi @Klimashin ,

    You should be able to get all your NetworkObject just fine.

    We suggest reading the Host Migration doc entry and the Sample code.

    • Can you check with the latest SDK Build 599?
    • When running the runner.GetResumeSnapshotNetworkObjects() in order to get the NO list, does it contain only 1 NO, in your case?
    • In order to get the list of Scene Objects, you must use runner.GetResumeSnapshotNetworkSceneObjects(); instead. When running it, what do you get?

    --

    Ramon Melo

    Photon Fusion Team

  • Klimashin
    Options

    Hi @Ram! Sure, we've read the docs and the sample code, great work you are doing here!

    We've updated SDK to build 599. The problem with snapshot remained, but we now have some more clews about what's going on. So, runner.GetResumeSnapshotNetworkObjects() still returns only 1 network object which is our gameplay context, spawned first. But worth mentioning that this gameplay context NO contains some nested NOs, i.e. our characters NO, and the data about those nested objects seems to be stored correctly in the snapshot too. But we still missing all the scene objects data inside the snapshot. We've also tried runner.GetResumeSnapshotNetworkSceneObjects() method and it returns an empty enumerator in our case.

    So, I may missed smth, but for now it looks like all the objects we creating with Runner.Spawn function are stored correctly in the snapshot. And all the object from the scene we load are missing.

    We are using multi-scene approach from one of the fusion tutorial projects which is basically looks like that:

    • there is a Networked scene manager with the Networked property containing the list of all the scenes that should be loaded.
    • All the scenes are loaded in additive mode, then Runner.RegisterSceneObjects called for NO both on host and clients.

    So, in conclusion, there is no Spawn method involved in our scene loading process. And all the scene objects are missing from the snapshot. On the other hand - all the objects, created with Spawn method does exists inside snapshot. Which makes me think that this difference in object creation may be the reason of our problems. Does that makes sense?

  • Heyy, I'm having the same exact problem.

    I've been taking the Host Migration Tech Sample and added Scene NetworkObjects to check there. But they don't come up in the runner.GetResumeSnapshotNetworkSceneObjects(); call.

    Are there any updates for this?