Creating 2d rooms

Heres a bit of a tricky one that I cant get my head around. So I’m trying to make a 2d game, obviously in unity 2d, and its set entirely indoors, in different rooms. How would I make my room map so players can walk inside the different rooms but not through the walls. I’ve managed to separate the rooms from the background, so I can obviously fill in where I want the players to access with alpha (or visa versa), but yeh, Im not really sure how to do this in Unity.

Can’t you just use colliders to block the path? Put colliders in the walls, floor an ceiling, but leave some section of the walls free so the player can move through them.