Using custom tree shaders?

Hi everyone. I’m currently working on a project that uses toon shaders, creating a similar effect to the “Walking Dead” or “Wolf Among Us” games, but have run into some troubles when dealing with the terrain’s trees. Created using Unity’s tree creation tool, when applying a simple shader with a lighting ramp, a message comes up indicating that the shader needs to have the words “bark” or “leaves” in the name, and the line: Dependency “OptimizedShader” = “OPTIMIZED_SHADER_NAME” in the code.

Is it a simple matter of changing small bits of the shader’s code (if so, how?) or am I going to have to use Unity’s standard tree shaders?

Thanks for your time!

This is 3 years old but I’ve just had the same problem. After a little bit of digging, here’s what I got:

As I understand it, all you have to do is include the line

Dependency "OptimizedShader" = "Hidden/Nature/Tree Creator Leaves Fast Optimized"

at the end of your shader (hence, the “OPTIMIZED_SHADER_NAME” in the error message).
In Unity’s default tree shader, that line is right above the Fallback shader.

Also, rename your custom shader to somethingsomething-leaves-something.