Do ıt have Room.IsOpen Listener

Options
I change room properties

Room.IsOpen=false;

But ı did not found ant trigger for complete room close.

I've tried Room.IsOpen=close While there is no internet connection.

print(Room.IsOpen);
Result=> false;

Is there a method that tells you that room properties have changed.
OnPhotonCustomRoomPropertiesChanged Does not give results for IsOpen=false.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @querwilly,

    Thank you for choosing Photon!

    I don't understand the problem here.
    OnPhotonCustomRoomPropertiesChanged should be triggered for remote players when well known room properties are changed also, like IsOpen.

    But are you saying it is not the case while there is no internet or in PUN's offline mode. It is expected since the PropertiesChanged event won't be received.

    In all cases, only custom room properties changes will trigger that callback when PUN is not in offline mode and when you do not use CAS.
  • querwilly
    Options
    i wi
    JohnTube said:

    Hi @querwilly,

    Thank you for choosing Photon!

    I don't understand the problem here.
    OnPhotonCustomRoomPropertiesChanged should be triggered for remote players when well known room properties are changed also, like IsOpen.

    But are you saying it is not the case while there is no internet or in PUN's offline mode. It is expected since the PropertiesChanged event won't be received.

    In all cases, only custom room properties changes will trigger that callback when PUN is not in offline mode and when you do not use CAS.

    Hello John,
    Internet Connection On
    PhotonNetwork.room.IsOpen=false;

    I tried OnPhotonCustomRoomPropertiesChanged not effected. please check your photon.

    Thanks
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    The OnPhotonCustomRoomPropertiesChanged will be triggered only on remote players and not for the local one who sets the properties.
  • querwilly
    Options
    JohnTube said:

    The OnPhotonCustomRoomPropertiesChanged will be triggered only on remote players and not for the local one who sets the properties.

    This is not a good method.
    I have to make sure the room is closed.
    The room closes in 1-2 seconds.
    When the game starts. Someone can enter with room name
  • querwilly
    Options
    JohnTube said:

    The OnPhotonCustomRoomPropertiesChanged will be triggered only on remote players and not for the local one who sets the properties.

    How can i be sure the room is closing
  • OneManArmy
    OneManArmy ✭✭✭
    Options
    Just create new room property "roomIsClosed".
    When client joins you can check if "roomIsClosed" and force to disconnect.
  • querwilly
    Options

    Just create new room property "roomIsClosed".
    When client joins you can check if "roomIsClosed" and force to disconnect.

    This is not goot method.

    I have to wait room closed and run game!
  • OneManArmy
    OneManArmy ✭✭✭
    Options
    Then wait till room is closed and start game (close room and run countdown timer).
    If someone joins after room was closed, kick him.
    Not always "good method" exists.
  • querwilly
    Options

    Then wait till room is closed and start game (close room and run countdown timer).
    If someone joins after room was closed, kick him.
    Not always "good method" exists.

    I did so.

    but User's internet is very bad.
    Is not closing the room.
    Closes the second room in the room.
    A lot of nonsense.

    Information must be provided precisely when the room is closed