Use one button as a state switcher. Just one.

So how would you make it so that if the button is pressed and released, it switches, but if pressed and released again, it switches back?

Your question is pretty vague and lacking details (there are several ways of making buttons, to start with), but the general concept is:

if (Button()) {
    myBoolean = !myBoolean;
}

Hey awplays49!

Normally, to handle this kind of thing, you would use a boolean/enum, with an if block around your button.

Like so:

 private bool bSecondState = false;  
    private Rect ButtonRect; 	//Set this wherever it suits
    
    void OnGUI()
    {
    	if(bSecondState)
    	{
    		if(GUI.Button(ButtonRect, "Go to first state"))
    		{
    			bSecondState = false;
    		}
    	}
    	else	
    	{
    		if(GUI.Button(ButtonRect, "Go to second state"))
    		{
    			bSecondState = true;
    		}
    	}
    }

You could of course change this to work with an Enum, and use a switch statement to control what the button does, but it all depends on your needs.

Hope this helps!