- Home /
How do I get list of country name, state name and city name for my users in my Game?
Hello Guys, For the last few days, I am finding a proper solution for my project but I am failing to do so. Actually, I want to show the form for my user so that they can fill it manually in which they can select country, state, and city from the drop-down list in the unity app but online all the solutions are like Geolocation and others. However, I just want to get a list of these so that my users can fill the form easily. I do not know what is the right way to do it. therefore, I want some advice on how to do so. Like should I include all these lists in my database so that they can get a list from my app database, I am thinking that it would require or waste too much space in my storage and I do not know the way to find the list of cities of every single city. so there is any way or I have to do this manually to add list in my database?
Answer by JustAbhi · Feb 12 at 05:40 AM
You could have the data you want to populate your dropdown with in a file or database as you please. Read the data and pass it as m_Dropdown.AddOptions(m_DropOptions);
to relevent dropdown components as required also don't forget to clear the previous options.
Here are some links I think will help.
Thank you for your answer. However, I have knowledge about drop-downs but I am struggling with a Database problem. Like what is the way to get data of a list of cities because to add that data in my database I need to have "Data", yeah it looks like a childish question but I do not have any idea on how to get data Information. so if you have any information. it will really be helpful for me. Thank you for your answer though.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Reading Gis Attribute Data in Unity? 0 Answers
Database error updating inventory 0 Answers
Updating variables from dictionary database in edit mode C# 0 Answers