I have created several types of plants as models in my Maya scene. I’ve painted them onto the terrain in my Unity scene, and they look great in the scene window as well as in the game preview. However, if I build the game, they fail to show up in the game, and also disappear in the unity editor. I have to Edit Details in the foliage painting tool and re-assign the game objects to the Detail brushes, which now say “missing” underneath.
This occurs even though I have tried it in both the Mac and PC versions of Unity. A 2-D grass texture is unaffected by the problem.
Has anyone seen this before, and/or found a solution?
I’ve been searching for about an hour and haven’t found anything about it. Thanks!
Hi, welcome to the forum!
Is it possible that you have modified the folder structure of your project from the desktop (ie, not within Unity)? Unity sometimes reacts badly when you do this and it may be that links to the model files are being incorrectly cached internally.
I too am having this problem! In my case I am swapping out two textures on one of the terrain details, which works fine when I play the game in the editor, but when I build it only one of the two textures shows up. I can go back to the editor just fine, but I cannot build so that both textures are in the game - the details are just totally gone when I do the action that swaps them.
I don’t think I’ve messed with the folder structure at all. Anyone else know what might be happening?
Additional Note: I think the only reason that they’re not disappearing altogether might be that I keep track of them in code so I can swap one texture out for the other when I need to. I think Unity might be deleting the initial texture, but not the secondary texture that I swap in, or something like that.
I should reiterate - it works fine in the editor. It’s only when I try to export a build that this problem happens.
SOLVED!
In the import settings for the texture image file, change “Texture” to “Advanced,” and check the box marked “Read/Write Enabled.” Ta-Da! It works!