zwcloud / MeshTerrainEditor-issues

Mesh Terrain Editor issue tracking and online docs
https://zwcloud.github.io/MeshTerrainEditor-issues/
5 stars 3 forks source link

Tools/Mesh to Terrain Converter error: Exception: Float array size wrong (layers should be 2) #52

Closed zwcloud closed 5 years ago

zwcloud commented 5 years ago

Describe the bug
When converting a mesh-terrain to a Unity terrain with Tools/Mesh to Terrain Converter, an error occurred: Exception: Float array size wrong (layers should be 2).

To Reproduce

  1. Open Tools/Mesh to Terrain Converter
  2. Drag the mesh-terrain object (with 2 splat textures on it) to the window.
  3. Click begin converting button, see the error
Exception: Float array size wrong (layers should be 2)
  at UnityEngine.TerrainData.SetAlphamaps (Int32 x, Int32 y, System.Single[,,] map) [0x00032] in C:\buildslave\unity\build\artifacts\generated\common\modules\Terrain\TerrainDataBindings.gen.cs:656 

Expected behavior
No error happens and a terrain is correctly created.

Environment

Your solution or workaround
Add additional splat-textures until there are 4 or 5 splat textures.