Forum Discussion
risikoruk
5 years agoHonored Guest
Rooms.CreateAndJoinPrivate2 returning NULL
Hello everyone
I start off by saying that I'm new to coding in Unity and for Quest and I find the official documentation hard to navigate but I welcome if you could point me to the answer assuming it's there.
I'm trying something very simple, to create a private room with the Platform.Rooms library.
Oculus.Platform.Request room = Rooms.CreateAndJoinPrivate2((RoomJoinPolicy)1, 2, null);
This simple line I got returns NULL and I have no idea why
Anyone can give me some insight on this?
Thank you!
1 Reply
- jibbs63Protege
take a look at what CreateAndJoinPrivate2 returns. It's not a simple "Request" object. It's a Request<Room> object. There is also no point in caching that result. You need to add a callback to it, so you can do something like Rooms.CreateAndJoinPrivate2(RoomJoinPolicy.FriendsOfOwner, 2, options).OnComplete(JoinRoomCallback);
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago