After working mainly inside the Unity3D
environment for the last couple of months, I decided to create a
standalone build. It didn’t work! Some mouse clicks did not seem to be
detected, while others produced the expected results. I went back to
Unity3D and everything worked fine there. Unity and it’s standalone
build must work in slightly different ways. Luckily the standalone build
output\_log.txt in the project’s
\_Data directory. Normally this contains very little, but
in my broken build the following lines were repeated.
Thus the problem is because the standalone can’t find the Shader
specified in a
Shader.Find() call. According to the
documentation for the API
shaders are only included in the build if they are used in a material or
Resources directory. The shader causing the error
was installed in the
Plugins folder (as it was part of a
plugin bought from the Unity Asset Store).
Just moving all the shaders into the
fixed the issue. A handy tip to remember when structuring your Unity3D
Comments: I have removed the commenting system (for privacy concerns), below are the comments that were left on this post before doing so…
test @ 2013-03-29 - thank you!
MF @ 2013-07-02 - We had just spent at least 30 minutes trying to figure this out. Thanks a ton!
Максим Таран @ 2015-06-11 - Edit->Project settings->Graphics-> ..add you custom shader
Александр Корчуганов @ 2016-05-04 - Thank you very much, dude!
Kleber Lopes da Silva @ 2016-06-16 - Thanks for that!
Alessandro @ 2017-09-28 - I was going crazy, thanks!