Best way to manage occupancy of interactables in the scene ?

Options
I am working on a project that lets the players in the room interact with the environment objects. For instance players can sit on the couch. I figured that assigning photon view component to all the interactables in the scene would be bad since I am planning to have tons of interactables in the scene. So, what would be the best way to handle such a situation ? I have made it working with one InteractableManager gameobject that has photonview and manages the occupancy for all interactable gameobjects listed inside it. But if a player joins the room while someone is sitting on a chair, that interactable will still be considered as empty on the new player's client. I can request for the current occupied interactables list from the masterclient and use it as base on the new player's client but all this felt a bit clumsy and felt like maybe I am taking the difficult route and maybe that there is an easier, better way. And that is why I am here :)

I am still an amateur when it comes to networking and this is one of my first projects that has multiplayer. Any insight would be really helpful :) Thank you !

Comments

  • Any insight would be helpful :)
  • Because of the MasterClient changes, everyone needs to have a copy of ownership status.
    one is to request ownership and let the mc determines who can own the photonview.
    Another is to record the fact in roomProperties with CAS then TakeOverOwnership, everyone see the changes without interference of MC.
  • Because of the MasterClient changes, everyone needs to have a copy of ownership status.
    one is to request ownership and let the mc determines who can own the photonview.
    Another is to record the fact in roomProperties with CAS then TakeOverOwnership, everyone see the changes without interference of MC.

    but, to do it this way, I will have to assign photonview component to all interactable gameobjects right ? Wouldn't that be bad if there are a lot of such interactables ?

    Sorry for the late response btw :)
  • Still wondering