Oh No! I’m Stuck in Fullscreen Mode

In one of my past articles, I mentioned keeping the screen size in Windowed mode when building the project, because I hadn’t yet implemented a way to ‘ESCAPE’ fullscreen mode. Now it’s time to do just that. I want to be able to play in Fullscreen and be able to exit Fullscreen at the press of a key. For this section, I’m going to have the Escape key exit the whole application and not just exit Fullscreen mode.

All we have to do is add some code to our “GameManager” script.

  • Add the following code inside the Update () method.
Adding Code to GameManager Script

That’s it! Now when you press the Escape key at anytime while the application is open, the application will close. Stay tuned. There’s more to this than meets the eye.

Thank you for taking the ‘short’ time to read this article. To stay up to date on the progression of this project, be sure to follow me here on Medium.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
James Hills

James Hills

I am a married father of 5 children. I decided at 13 years of age that I was going to become a Software Developer.