How does one handle different screen resolutions (Example Unity 102 class Spaceship)?

In the example game made in the Unity 102 class, he locked the resolution to the web player.

When I build the example for PC and increase or decrease the resolution, the player can move off the screen. How can you make the left and right boundaries be at what the camera is seeing? AKA How can the boundaries change with resolution changes?

This seems to happen to all my test games. I start a desktop game and make the game with boundaries on the screen, and the game view is on Free Aspect. When I export it to build, all the sides of the arena are cut off and the player can go off screen to them.

If anyone needs more detail of what I mean, feel free to ask.

Screen.width
Screen.hieght

What about it? I’m aware that those exist but what do I do with them?

When I drop an item in the editor it doesn’t let me place it to a position of screen.width etc.