Filter network traffic from sets of players

Options
continuing my experimentation in trying to set up a custom scene loading mechanism, I'm curious if there is a recommended way of filtering the network traffic from photonviews for players that I'm not interested in.

For example, I have a Photon Room with 2 players - each are in a different Unity scene. I want to get player properties updates (to see if the players have switched scenes), but don't want to get all of the photonview updates for the character positions etc while they are in the other scene.

Is this as simple as just disabling the photonview components for the players in scenes that aren't the same as the local player?

Comments

  • gekido
    gekido ✭✭
    Options
  • gekido
    gekido ✭✭
    Options
    Ok ignore this - did some thinking about the whole model that I need for the game and have come up with a way of handling this in a different way that doesn't require this kind of object manipulation, and ends up being much simpler in practice.

    Basically each location will be their own photon room and the players jump between them. Will mean more rooms (and joining / connecting), but will be infinitely simpler to implement in the long run I think.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options

    Hi @gekido,

    I did not read everything but to answer your question from the original post, I think you could use Interest Groups: one interest group for all PhotonViews on the same scene. Switch interest groups when switching scenes.
    https://doc.photonengine.com/en-us/pun/current/gameplay/interestgroups

  • gekido
    gekido ✭✭
    Options
    huh...'interesting' - hadn't stumbled upon those yet. Will be very useful for the project either way.

    Thanks!