If just one of these if statements launches all the rest launch too, can someone help me?
void OnTriggerEnter2D(Collider2D other)
{
Debug.Log(other.gameObject.name);
if(other.gameObject.name == "X_Middle");
{
x_middle.enabled = true;
}
if(other.gameObject.name == "X (Bottom - Middle)");
{
x_bottom_middle.enabled = true;
}
if(other.gameObject.name == "X (Upper - Middle)");
{
x_upper_middle.enabled = true;
}
if(other.gameObject.name == "X (Right - Middle)");
{
x_right_middle.enabled = true;
}
if(other.gameObject.name == "X (Left - Middle)");
{
x_left_middle.enabled = true;
}
if(other.gameObject.name == "X (Top RIght Upper Corner)");
{
x_top_right_upper_corner.enabled = true;
}
if(other.gameObject.name == "X (Top Right Bottom Corner)");
{
x_top_right_bottom_corner.enabled = true;
}
if(other.gameObject.name == "X (Top Left Bottom Corner)");
{
x_top_left_bottom_corner.enabled = true;
}
if(other.gameObject.name == "X (Top Left Upper Corner)");
{
x_top_left_upper_corner.enabled = true;
}
}