- Home /
Question by
Slavrix · Sep 01, 2014 at 03:00 AM ·
terraintexturesplatmap
splatmap textures not applying in build
in the unity editor, my splatmaps work perfectly, however when i build my terrain is just plain black.
is there a setting that i may have missed when building that is required to make the splats work ?.
editor
build
i load them in using code with
SplatPrototype[] terrainTexture = new SplatPrototype[4];
terrainTexture[0] = new SplatPrototype();
terrainTexture[0].texture = (Texture2D)Resources.Load("stone");
terrainTexture[1] = new SplatPrototype();
terrainTexture[1].texture = (Texture2D)Resources.Load("sand");
terrainTexture[2] = new SplatPrototype();
terrainTexture[2].texture = (Texture2D)Resources.Load("grass");
terrainTexture[3] = new SplatPrototype();
terrainTexture[3].texture = (Texture2D)Resources.Load("snow");
edit i attempted adding the textures to the code as variables draged in rather than using resource.load, also didnt work
edit i ended up finding another post to a workaround which works, unfortunate that i couldnt work out a proper solution though http://answers.unity3d.com/questions/171150/terrain-basemap-texture-through-code.html
untitle2d.png
(116.3 kB)
untitled.png
(25.2 kB)
Comment