How to sync an assetbundle scene?

Options

I've come across a problem where players aren't showing up in each other's scenes. I'm not using scenes from the build index, I'm downloading them at runtime from my server. This has caused some issues because on the host's view, all players are present. But on the other client's view, the host isn't there and I get a compiler error saying the gameObject simply doesn't exist. I know games use this method of downloading scenes at runtime but I don't know how to do this properly since this is my first time. Any help would be appreciated, thanks!

Answers

  • Tobias
    Options

    At it's core, PUN does not really mind, which scene(s) you loaded. It can sync one scene but not multiple.

    You need to make sure you load scenes additively, or else Unity will destroy existing objects. This may mean networked objects are destroyed (and no longer visible)...

    Could you treat the scenes as distinct places? I mean, does the position in the world define which (part) of a scene is needed? In that case, you don't really have to worry about it. Simply instantiate the characters, let them move around and as needed, load and show more of the scene(s)...