I have a lot of tags and i want to have work for all tags except DOOR
if(Input.GetMouseButtonDown(1) && hit.transform.gameObject.tag == "All"){
Build();
}
I have a lot of tags and i want to have work for all tags except DOOR
if(Input.GetMouseButtonDown(1) && hit.transform.gameObject.tag == "All"){
Build();
}
The != operator means ‘not equal to’.
if(Input.GetMouseButtonDown(1) && hit.transform.gameObject.tag != "DOOR"){
Build();
}
Just use !=