Conditional colliders based on input.,Is there a way to make a collider conditional based on input?

I’m making a 2D (maybe 2.5D as I progress) game where my character needs to be able to, on command, walk through walls. So, say I walk up to a building, normal colliders apply, but say I press the space bar, my character now ignores that collider and can step through. Any suggestions? If you need any more context than that, ask away.

Get a reference to the collider and disable it with if (whateverkey) Collider.enabled = false;