The cubed skybox works fine when running the app inside the Editor, but for some odd reason the skybox isn't visible when run as a build (x86). Any ideas how to fix this?
*EDIT* I tracked down the problem having something to do with the shader generated by the script. On my end using the script's default "Unlit/Texture" doesn't work in build. (Works in editor) Changing "Unlit/Texture" to "Self-Illumin/Diffuse" gives approximately the same visual effect and works in both editor and build.
I think I have a better solution for the missing skybox after deployment. The skybox isn't visible, because it isn't assigned to a material when building. Unity strips out all unused assets to keep the build size down.
If you create a "Resources" folder and put the used shader in there you can force it to be included in the build. 🙂
I agree that using the script's original "Unlit/Texture" shader would be better.
But why then would unity include the "Self-Illumin/Diffuse" and not the "Unlit/Texture" shader? Note that I've only changed the string-name in Nora's script for the type of shader to generate. There really shouldn't be any difference.
But I had the same problem with the skybox not showing. "Unlit/Texture" isn't used somewhere else in the scene would be my guess, so at build it isn't compiled. "Self-Illumin/Diffuse" is included, because it is used somewhere else in your scene. So you can use another shader or place a shader in the Resources folder and use that one. 😄
Im positive that "Self-Illum/diffuse" isnt in use in my project. Actually I tried a bunch of different shaders to find one that works visually for the skybox, and build ofcourse. Each of them worked, but not the "Unlit/texture" :mrgreen:
Everything works fine except Follow a target. Maybe it's my misunderstanding, but change "PostUpdate" to "Update" solved this problem. How will "PostUpdate" work to update the transform?