The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Check if player is in a room

2020-11-02 07:59:13

Hi all,
My question is simple: How do I check if a PUN player is in a room? Not when he joins a room, but if he is in a room.

I want to do this as validation for a mouse lock script. I want a section in a script to run only if the player is in a room. I wish to do this on a different script for modularity.

Any solutions?


2020-11-02 08:10:07

check out the docs

2020-11-02 09:32:47

Hi @wolf1212, @S_Oliver,

There is already PhotonNetwork.InRoom.

2020-11-02 14:09:04

Thank you for your answers.

Back to top