Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Photon Interest Groups for Culling

Discussion in 'Multiplayer' started by Redrag, Jan 23, 2023.

  1. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    179
    I must be missing something. The concept of this seems simple enough but it's just not working.

    I am doing this globally at the beginning of the Photon session ( and during runtime as needed):

    //This should mean we send to peers in our own area and close areas
    PhotonNetwork.SetSendingEnabled(disableSend.ToArray(), enableSend.ToArray());

    //This is for receiving. EnableInterest just has one area - mine. DisableInterest has all other areas
    PhotonNetwork.SetInterestGroups(disableInterest.ToArray(), enableInterest);

    Firstly I get an error: Operation ChangeGroups (248) not allowed on current server (MasterServer)
    Then the error goes away, even when the code runs again. But the culling has no effect.

    If anyone has any ideas....
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
  3. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    179
    Thank you Tobiass. I have an existing game, so know how to get into a room. However examples and documentation point to being able to change interest groups on the fly or else not much point using for culling.