How do I make a part of my map off limit?

I’m looking for a common way to make zones in my 3D map "off limit"? The kind of thing you see in eg Hitman games where NPCs will get suspicious if you step into certain areas. Will need several areas like this, corridors, rooms etc.

Is it just to create invisible collider objects that set an offLimits bool to true, or is there a preferable way?