3 Replies
Hi @fgamez1020. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To join the first available room without specifying a room code in Normcore, you can use the
Connect()
method with a randomly generated or predefined room name. Here's how you can do it:
1. Use the Realtime.Connect()
method, providing a room name of your choice. All clients connecting to the same room name will end up in the same room server.
2. You can generate a random room name or use a predefined one. For example:
This approach will connect you to the specified room, creating it if it doesn't exist or joining an existing one if it does.
It's important to note that Normcore doesn't have a built-in concept of "first available room". Each room is identified by its name, and rooms are created on-demand when clients connect to them Realtime API (https://normcore.io/documentation/realtime).
If you want more control over the connection process, you can use the ConnectOptions
parameter:
Remember that room names in Normcore are namespaced to your App Key, so different apps using the same room name will connect to different rooms Realtime (https://normcore.io/documentation/realtime/realtime).
For more detailed information on connecting to rooms, you can refer to the Room documentation (https://normcore.io/documentation/room/room).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1053407831916822528> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
use unity lobby or any other lobby plugin