Hai, i saw this in the internet, and i couldn’t think what is this about:
they created the boolean which is named obstacles and set it to false.
public bool obstacles = false;
But, what is this line about:
obstacles = obstacles ? false : true;
if (obstacles)
{
transform.renderer.material.color = new Color(.5f, .5f, 0.0f);
}
else
{
transform.renderer.material.color = Color.white;
}
I know the if and else function, when there is an obstacles, turn the material to the assigned color, or if there is not an obstacles, turn the material into white color. But, what is this line about: obstacles = obstacles ? false : true;
Thanks… Sorry for this newbie question.
if (obj1.activeInHierarchy == false ) or if (!obj1.activeInHierarchy)
– PrisVas