- Home /
Question by
Thesaint · Sep 08, 2016 at 02:20 AM ·
manualerror reporting
Error in Manual Code I think please verify
in the link below there is a description to the setdetaillayer api https://docs.unity3d.com/ScriptReference/TerrainData.SetDetailLayer.html if you take a closer look at the threshhold its a float and the map[,] variable is supposed to be an int array as stated in the public void SetDetailLayer(int xBase, int yBase, int layer, int[,] details) how come
if (map[x, y] < threshold) { map[x, y] = 0.0; } then // Assign the modified map back. t.terrainData.SetDetailLayer(0, 0, 0, map);
in anyevent all i wanned to know is how to set the position of the grass on the terrain and that code confused me.
Thank you for your time and effort i really appreciate unity and the ppl behind it also the community is really awesome.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612092344im_/https://answers.unity.com/themes/thub/images/avi.jpg)