- Home /
Server-side generated heightmap
Hello to everybody !
I'm new to Unity and I'm totally lost in what I'm trying to achieve :
I have a PHP server generating a 16x16 cells grid, corresponding to 1 terrain chunk (an entire island in my game, low-poly terrain is fine.).
I want my script to dynamically load the grid from the server as a JSON object and create a new Terrain object with the values from the loaded grid.
I'm already stuck with the 'loading raw data from server' part because I use :
var www = WWW("http://localhost/unity_network/simpleTerrain.php");And I don't know how to parse www.text response as an array or anything similar and how to apply it to the terrain.
yield www ;
Thanks for your help !
Your answer
![](https://koobas.hobune.stream/wayback/20220613070815im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How would I flip or mirror Terrain data during runtime? 1 Answer
Tracking information across terrain 1 Answer
heightmapWidth and heightmapHeight always equal 1 Answer
SetAlphaMaps Opacity Gradient 0 Answers
How do you make the material in the Terrain detail prototype properties update after runtime? 1 Answer