Check if player is in a room
The whole answer can be found below.
Try Our
Documentation
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.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Check if player is in a room
ThumbstickStudios
2016-01-09 21:34:18
Hi All,
This is probably an easy question although I can't find it on the documentation anywhere probably just blind.
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?
Comments
Hi,
PhotonNetwork.inRoom returns true if client is connected to a room.
Back to top