how to see if player is connected to room
how can i get a bool that tells me if the player is connected to a room or not
2 Replies
Hi @MasterOX 水. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
You can check if a player is connected to a room by using the
connected
property of the Realtime
class in NormalVR. This property returns a boolean value indicating whether the Realtime instance is connected and its views are initialized.
Here is an example of how you can use it:
In this example, _realtime.connected
will return true
if the player is connected to the room, and false
otherwise.
For more information, you can refer to the Realtime class documentation (https://normcore.io/documentation/reference/classes/Normal.Realtime.Realtime).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@758040514678489279> kapa.ai is still learning and improving, please let us know how it did by reacting below