Make networked objects visible in two different scenes?

Options
I have a game where where there are two scenes which separates a VR player and an AR player. In the VR scene there is a room with some objects that the VR player can interact with, and they are also instantiated.
The AR player, which gets sent to the other scene, is made with ARCore. He is only supposed to see the VR player prefab, and the objects he is interacting with, but I have not found a way to make these objects visible in the AR scene.
Does anyone have an idea of how this can be done?

Comments

  • Tobias
    Options
    In principle, PUN is independent from the scenes Unity loads, so your networked objects can exist in either context.
    When you use multiple scenes and have networked objects in there, be ware they likely don't get the same network IDs. Means: When both players load different scenes with different objects being "network ID 1", then there is a mismatch.
    However, you can simply avoid scene objects.

    AutomaticallySyncScene should be off by default, so you should be free to load different scenes.
    Instantiate the interactive objects at runtime, if possible.

    Alternatively: Load one base scene that defines the networked objects and then per device load another scene additively.