- Home /
Grass (terrain detail mesh) show in editor, not in build
Hi everyone, I have an issue with grass painted with built in terrain tool.
I use detail mesh for grass.
Every thing was working fine but since I added some more types of grass and painted it, my grass doesn't render in build (standalone or web).
-I've of course double checked render and terrain settings and I'm at the maximum draw distance so it should be alright.
-I've checked the compression settings of grass texture trying some different ones but it doesn't work.
-I've heard about a bug that would fix itself when rebuilding a new project with same assets, but it's the same.
-No changes have been made to my main camera from when it was working and now.
-Same problem in webbuild, standalone buid, windowed or FS.
Thanks a lot.
See pictures, first the editor game view, then build.
Yes but I have also checked those and they are all okay (as they should because they are the same since the start of the project).
Getting the exact same issue in my game, editor is fine but then as soon as I test it in a standalone player, no grass past like (1,0,1) distance from the player. :|
Same here. Tried a LOT of things, nothing doing so far.
This includes:
Painting different vert colors in $$anonymous$$aya
Downrezing my detail mesh to next to nothing
Trying different Quality Settings
Tryting different FBX export settings
Freezing Transforms / Deleting history (hey worth a shot)
I got nothing. Is this a bug in Unity? I would love a solution to this.
Answer by I-am-Lawrence · Jan 22, 2016 at 08:16 AM
To whom it may concern,
I had this same issue. I was creating terrain data at run-time, adding the prototypes, and generating splat & height maps, trees, and details (grass). No matter what I did, I was unable to get the grass to display at all when exporting to a stand-alone build. The only way I was able to solve this problem was to create a new empty terrain in a scene, add all prototypes, and instead of using a new terrain data created at run-time, I attached this terrain data to my generator script and used it instead. I was able to remove the terrain from the scene, and when my project was built it ran correctly. Hope this helps someone!
I'm guessing the internal workings of the terrain are undocumented for a reason.
I also had this same issue, but was able to add terrain textures, grass, and detail prototypes at runtime using this method:
I had to create a GameObject with terrain and terrain collider components attached (standard terrain GameObject) in the editor, then at runtime i cloned multiple copies of it to use as segments. I was able to add terrain textures, grass, and detail prototypes at runtime, it is not necessary to add them in the editor if you don't want/need to.
Answer by introoutro · Nov 12, 2013 at 07:19 AM
Hey! I think I just got it working.
If your detail mesh has a material with no texture assigned, it might be causing this problem. If you're using the Grass rendering method, throw a texture on the mesh that is the same color as your "Grass Color" in your terrain settings. If you're justing Vertex Lit as your rendering method, maybe trying throwing a 50% grey texture onto it.
Give that the ol' college try.
Answer by cwmanley · Dec 17, 2013 at 08:44 PM
I had the same problem.
I changed the import settings to fix.
Answer by youlweb · Jun 21, 2020 at 09:31 PM
I had to set Read/Write Enabled
to true
on all my grass textures to solve this problem. It consumes more RAM though, which is not desirable. I hope this gets fixed.
Your answer
Follow this Question
Related Questions
Render layers differing between Editor and Build 2 Answers
Materials breaking in built project (but not in editor play mode) 0 Answers
Shader does not display properly in game/editor view, but building it works. 0 Answers
Distribute terrain in zones 3 Answers
Graphics.DrawTexture() not rendering on builded game (but it renders on Editor) 2 Answers