- Home /
WWW & and strings in C#
I'm unfamiliar with C# and still pretty new with unity. I'm trying to pull data from the php back end space.php?displaycity=id#
and using each data row to populate a window (map) using buttons as the buildings. there are 5 values for each row ID UserID PlanetID BuildingEntry x y. At the moment i only need the BuildingEntry and the x,y. I'm unsure how to go about pulling the data in C# to public int[,] CityMap=new int[11,21];
(x,y) Then placing it similar to the static building. I'm sorry if being a little vague, I'm not overly sure how to go about explaining this.. Any thoughts or insight would be greatly appreciated.
Here's is what i have so far. http://pastebin.com/U4kXVEJE
Answer by duck · May 08, 2010 at 11:01 PM
The answer linked below might help, it explains how to parse data from a text file.
In that particular case, the data comes from a local text asset, and is split up into rows by return characters, and into items by comma characters. Your PHP data might use different delimiter characters, so adjust it to suit your own data. The principle should be the same though.
Your answer
Follow this Question
Related Questions
Max String Length in WWW url's? 1 Answer
Best way to convert data into variables from a www request? 0 Answers
Download a WWW int? Or convert? 1 Answer
Streaming Assets android 0 Answers