How to make the 'Boss' part of a level

Most 2d side scrollers have to where you get to the end where the boss is and once the player crosses a certain point they cant go back nor can the camera view beyond the border.

Exhibit A:

Now how in Unity would i tell it to recognize that once the player passes a certain point it starts the (example) ‘boss’ function

I have some ideas to make it but i would like more insight and im sure someone has experience with it with how/ do’s / dont’s

Basically i want to know how to put an invisible barrier up and bind it to code once player passes it either activating a boss round or end of level.
Im sure its probably just a a collider with no properties and its just to let in code know that the character passed this point and activates some functions.

If theres a topic already about this, im sorry for posting this.

The way I’m planning to do this, is I already have my camera set up so that it can be bound to only move within a certain set of limits. I also have a function on this camera that other objects (triggers ect.) can call to remotely change those limits.

I’ll see if I can dig up the tutorial I used to set my camera limits up, but basically if you have a system like that, you can make a trigger (perhaps an invisible collider you must walk through) that changes the camera so you cannot see out of the boss area then instantiate a blockade just off screen.

Have some disabled colliders set up for your borders, use a trigger to turn them on. Instant borders.

Thanks for the info and Yeah I already use disabled colliders for my camera controller but thats just to bound the camera inside the level so the player cant see out. I just need to know how triggers work in unity so i can use them to my advantage.

Thanks and if you can hit me up with that tutorial that would be great. All i need to know is how triggers work and how to bind them

Triggers are just Colliders with the IsTrigger toggle checked on.

To use them, all you have to do is put a script on the same GameObject, use the OnTriggerEnter method and put some code in it.