Game looks different in build than in Editor

Hey guys,
so I’m in the middle of developing an Android app using Unity 5.4, for now I’ve just implemented a script that allows to draw straight lines using LineRenderer.

So this is how my game looks in-editor (and in the program itself):

And this is how it looks when I build and run it:


What is causing this difference and how could I solve it?
Thanks in advance

The material used in the LineRenderer isn’t in use anywhere when you’re building the scene, so the compiler strips it out. If you add an object which includes the material in the scene, it should be available again.

See this answer.

1 Like

Sorry for the late answer, but I just tried what you said and it worked instantly :smile:
Thanks so much man!