As the title says I’m having an issue with color on a primitive cube in the web player. My code builds the primitive at runtime. When the code runs in the Editor the cube takes the correct color of Color.white
but when I build to the web player and run it the cube takes a magenta color. I don’t have magenta anywhere in my code. The cube is using a shader of unlit/texture. Anyone know why this is happening?
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
cube.AddComponent<CubeScript>();
cube.renderer.material.shader = Shader.Find("Unlit/Texture");
cube.renderer.material.color = Color.white;