heightmapResolution gets reset to 33

Hi,

I’m generating terrain at runtime, and one of the first things I set when creating the terrainData is the heightmapResolution.

newTerrData.heightmapResolution = HeightMapRes;

Currently I set HeightmapRes to 48, though for some reason when I do the above piece of code, the heightmapResolution is 33. First I tried to set it to 16, but then it also became 33…

Any idea why?

Thanks!

-P

Ok, already found the answer myself!

Apparently heightmap res has to be a power of 2 + 1, and minimum 33. So 65 also works.

Hopefully this helps someone that also has this problem ^^

-P