- Home /
Line Renderer Appears Semi-Transparent instead of White?
Hello, everyone. I gave an empty gameobject a line renderer component and didn't change anything about it. I then used this code to set its color to white:
Line Renderer lr;
void Awake()
{
lr = GetComponent<LineRenderer>();
lr.material.color = Color.white;
}
However, the result was some sort of semi-transparent gray:
How would I make it as white as the cube or any other solid color? Thanks for your help!
while in play mode, check the material it uses and it's values, foremost the color. it might have been changed for some other reason.
Answer by SickTrickz832 · Jul 01, 2018 at 12:48 PM
Well, in the line renderer component of the gameObject it is attach to, you can add a material instead of a colour in the script.
Make a material and just make it white, then drag it into the tab called 'Element 0' which will change the colour to white, pure white
Your answer
Follow this Question
Related Questions
Material doesn't have a color property '_Color' 4 Answers
Changing two different objects renderer colour 1 Answer
LineRenderer not showing the correct color. 1 Answer
How to set LineRenderer color? 0 Answers
LineRenderer renders the wrong color 3 Answers