How to make a roguelike minimap (room based)?

I want to make a room based minimap like rogue legacy or enter the gungeon. I’ve aready knew that for a normal minimap you just have to create a second camera and pass the data to a render texture, then assign the render texture to a raw image. But i had no clue how to make a room based one. For basic, how to display a rectangle (room) or grid on the screen or ui. Do i need to make a render texture? What do i need to achieve something like this? I think i can easily know which room the player has already explored, the width and length of each room but how to display those?

My solution is to use a texture 2d.