Count total rooms

0 votes
Hello, I want to know a Total number of rooms right now in my Unity game. I want to call WarpClient.GetInstance().GetAllRooms() but there is no room created so it gives me null reference in unity. so I want something like

if(total_numberofrooms_onserver > 0)

{

WarpClient.GetInstance().GetAllRooms();

}

else

{

print("no rooms on server");

}

so how can I get this total_numberofrooms_onserver?
asked Mar 20, 2018 in AppWarpS2 by mkc110891 (16 points)
Hi can you please answer
Thanks

1 Answer

0 votes
 
Best answer

Hi,

We have removed the null pointer exception in case there is no room available and you are calling GetAllRooms API.The callback onGetAllRoomsDone will be called with an empty roomIds array.

Please download the updated DLL from here and check.

Let me know if you have any further queries, I will be happy to help.

Thanks.

answered Mar 22, 2018 by rajeev.etc (1,660 points)
selected Mar 26, 2018 by mkc110891
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...