TerrainGenerator
TerrainGenerator copied to clipboard
Index was outside of bounds of the array error:
I got the following error when generating the terrain:
IndexOutOfRangeException: Index was outside the bounds of the array. ForestGenerator.Generate (System.Single[,] heightMap, UnityEngine.Vector3[] normals, System.Single waterLevel, System.Int32 seed) (at Assets/TerrainGenerator/MgeeGames/ProceduralTerrainGenerator/Scripts/ForestGenerator.cs:86) TerrainMapGenerator.CreateForest (System.Single[,] heightMap, UnityEngine.Vector3[] terrainNormals) (at Assets/TerrainGenerator/MgeeGames/ProceduralTerrainGenerator/Scripts/TerrainMapGenerator.cs:270) TerrainMapGenerator.Update () (at Assets/TerrainGenerator/MgeeGames/ProceduralTerrainGenerator/Scripts/TerrainMapGenerator.cs:151) UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <33518779906b403ba9f96eccba6a861b>:0)