Search Unity

UNET - Any way to create zones / instances / channels / rooms?

Discussion in 'UNet' started by NewGameDeveloper12345, Aug 29, 2016.

  1. NewGameDeveloper12345

    NewGameDeveloper12345

    Joined:
    Mar 28, 2016
    Posts:
    2
    I'm looking into networking options and so far most interested in UNET and TNET. One feature TNET has which sounds really nice is the concept of channels. It lets you put players/objects in different channels and it acts like a different zone. EG: You can have channel 1 = town, channel 2 = dungeon, channel 3 = chat channel, channel 4 = shop, etc.

    Is there any way to have this kind of system (or even simply have different players in different scenes), or do they all have to be in the same scene/area for it to work properly?

    Thanks
     
  2. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    Hi , Visibility checks can do simulate what you want pretty well.
    Define a component which overrides related methods and have a list of channels and make players visible to those others which are in the same channels only.

    You can do it per object however and not per message.

    See this page for methods to override
    https://docs.unity3d.com/Manual/UNetVisibility.html