- Home /
Replacing TerrainData#splatProtoypes in 2018.3
What property should I use for accessing a terraindata's list of splat textures, instead of the obsolete TerrainData#splatPrototypes
? Or, with the terrain layer system, can I even access the list of textures this way?
In my case, I'm trying to copy the splat prototypes (textures) from one TerrainData
to another. How do I do this in the new beta update?
Would I just copy terrainLayers
?
Comment
Answer by betaFlux · Dec 31, 2018 at 01:52 PM
I had the same problem. Indeed, you need to use terrainLayers:
TerrainLayer[] splatPrototypes = terrain.terrainData.terrainLayers;
$$anonymous$$y VB could not find class TerrainLayer. Where is that?
You need to add "using UnityEngine;" to the top of your script. EDIT: That's what you need to do, if you are using C#. I don't know how it works with other languages in Unity, sorry.