Showing results for 
Search instead for 
Did you mean: 

Rooms.CreateAndJoinPrivate2 returning NULL

Level 2
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!


Level 4

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);