I have a simple 2D game with one simple Prefab as “tile”. When I start the game in the Editor it works fine, everything is rendered. When I build on my windows 7 or win 10 maschine for standalone Win or Android all works fine. However when I trigger the build via gitlab CI in the result the tiles are not rendered only the text canvas element which is a child element of the “tile”.
I use Unity Version 2018.2.3f1. The Docker Image I use is from here: GameCI / unity3d-gitlab-ci-example · GitLab
I added the shader to the ‘Always Included Shaders’ list. I tried “Unlit/Color”, “Standard” and the “Legacy/Specular” shader. None of them work.
When I get the shader from the material of the Gameobject it is the correct shader and the isSupported
property is true
. When I remove the shader from the ‘Always Included Shaders’ list the game crashes when creating the Material programmatically since the shader is not found.
Even if I don’t create the Material on the fly it is not working.
My Code for creating the Material:
Renderer rend = this.Tile.GetComponent<Renderer>();
rend.material = new Material(Shader.Find("Unlit/Color"));
rend.material.color = color;
So my question is: What can I do the properly render my “tiles”? For what debug/build output do I have to look?