Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Per Scene Data Store, Additive Scenes

Discussion in 'Multiplayer' started by xdeployer, Oct 8, 2022.

  1. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    9
    Hi. I am using additive scenes and interest manager for a multiplayer dungeon game. I am using Mirror. One issue I am running into is having a per scene data store that all the game objects in a scene can access. I am additively loading the same scene each time.

    There are a couple of problems I have run into. I thought about finding all objects with a data store tag and then checking if that is in the same scene as the object requesting the data, but the following line from Mirror breaks the assumption that all the objects will be in the same scene (on the client)

    Note that the networked objects are only moved to subscenes on the server. Clients spawn everything in the container scene, and there's no need to move objects to a subscene on the clients, since they only have one subscene loaded at a time.

    Well in my case there is a reason to move objects to a subscene. That would be to verify which data store game object to use. Any ideas ?