Unity Deployment: The Escape Button is a Feature

Before you build your game in exclusive full-screen mode, you should first think about adding an exit feature to your application, otherwise there will be no way to exit the game or close the game window.

This is easy to do, just use the condition and check the input key for “Escape” and then use the “Quit” method of the “Application” class:

Remember not to copy code, if you are not sure how to write a function, try to find it yourself using the Unity documentation available at the link below:

Happy Coding!

--

--

--

Hi, I’m Damian, a Unity Software Engineer who loves building education and simulation games.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Setting Up a Simple Local Server Using Python in Windows

Open sourcing packages used for testing at kununu

Designing a Highly Available Architecture through AWSCLI

Kryptonetikz_v.1_24/3/21

Easily change file path using Power Query

Continuous Integration & Meteor

Integrating the Payment Request API with a payment service provider

How to Build a Custom Ribbon in Excel

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
Damian Dąbrowski

Damian Dąbrowski

Hi, I’m Damian, a Unity Software Engineer who loves building education and simulation games.

More from Medium

Making a Treasure Chest System Using Timeline in Unity

Moving Platform and Lives

Unity Tutorial — Toon Shade in HLSL

Building UI elements in Unity