I’m getting a really weird error. When trees swap into their billboard mode in a web player or standalone, they turn pink as if there were no shader. It looks fine in the editor.
Additional important info:
The level is loaded from an asset bundle
The shader is in the “Resources” folder so it should be built in the player
The attached PinkTrees.jpg is in the stand alone, NoPinkTrees.jpg is in the editor
we have the same issue. after converting 2.6 project to 3.0, the tree billboards went pink. They were the scott’s pine tree from previous unity resources release.
Just tried using a procedural tree grabbed from the soldier demo… and get the same issue with those.
It looks fine in the editor, but proken when published.
OK we found a solution…
the problem is we are loading our levels as bundles… as such our default scenes have no terrain or trees, so Unity appears not to include the billboard shader in the build…
the solution is to put a small terrain and one or two trees on the terrain, in your first scene that is loaded as part of the build (not a streamed / bundled asset)
then the billboard shader is included, and your trees will be fine, this fix worked for us.
This fixed the issue for us too but added over 1.5 meg to the initial scene download, and seeing as we’ve been scrimping and scraping to get aa few extra kb back this is a bit of a bombshell. Isn’t there away we can just include the shader on it’s own?
I really need to shave this time of as its proably 5 seconds + download time for some.
I figure that if I can somehow dump the tree shader into my resources folder this will do the trick and I wont need a terrain in my scene, howvere the shader used is a hidden one. Any idea how I find this and place it it my resources folder? (I’m posting the same question to Unity answers)
I tried the 1.5MB solution above and it did work, but with a major pitfall! It only works for the trees that I include in the WebPlayer mock terrain! (I can’t include all trees into this WebPlayer!)
I ran a few tests – I added a “Sycamore” tree to my WebPlayer startup scene, and it only works for those trees. My other tree “BigTree” still has pink billboards! If I do vice versa, and only add “BigTree” to my startup scene, then it only works for BigTree, leaving the Sycamore billboards pink! This is totally not workable. It’s a critical defect for our project, which totally depends upon loading scene content dynamically in AssetBundles.
Use Case:
Artists create a great looking Terrain/Environment under a single top-level game object.
They create a prefab out of this top level game object.
We build this prefab, and make it into an Asset Bundle.
Run-time, we load this bundle and instantiate it. The terrain shows up perfectly, except for PINK TREES. Critical defect.
My guess is that Unity somehow prebuilds the Billboard textures somewhere, and this is not getting done for us.
For the interim, I’m not sure what we’ll do. Turning off billboards entirely seems to be the lesser of evils – but looks horrible!
It seems like the collect dependencies does not work as intended, i have notices that if you select the object in the inspector and right click and select the depependencies and then use the standard unity3d export assetbundle code it works 100%.
But i have created this snippet for you guys, it basically select all the dependencies via AssetDatabase.GetDependencies and then create the assetbundle from there.
Noone want to do all their assetbundles manually, tested this and it work 100%.
Hi, i’m using Unity 5 and i had exactly the same issue, but the @JonnyHilly 's answer didn’t worked for me, i’ve created a new terrain with the trees inside it, but the Bundle-loaded trees are still pink
EDIT: also i get a error when i open the trees by the editor, which it says somethingwith a mising property calle Squash or something like this