- Home /
How to use Hashtables?
So I've gotten pretty far with my multiplayer fps game and now I'm thinking of making more than one level and I want to load that level of the specified server that you select from a sever list, and if I'm correct I think you have to use a hashtable for that. And so I don't know how to use a hashtable but I know how to create one, but I'd like to use it with Photon Unity Networking in the "CreateRoom" function. So, how do I make a hashtable that contains a level id and that I can use with Photon Unity Networking's "CreateRoom" function in the hashtable section?
Why do you believe that you need to use a HashTable for the server list? Is that a part of Photon's API? Otherwise you could use pretty much any list of rooms.
HashTables are meant for finding stored values quickly. That's not the case with level lists - even if you had thousands of levels, you would not be looking for them often enough that hashing their storage would be in any way beneficial.
Also, when you're presenting the list of levels to your player, you're going to have to look through the entire list to find what levels to present. There's simply no conceivable reason for why you'd use a HashTable in this situation, unless Photon's forcing you.
Your answer
Follow this Question
Related Questions
How do I set up multiplayer? 0 Answers
Tutorials for using UFPS with multiplayer? 1 Answer
PUN is being incredibly slow in builds 1 Answer
Unity Photon Name-Tag Problem 2 Answers
photon rematching game doesn't work 0 Answers