Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Close Game

Discussion in '2D' started by StardustBlaze, Feb 2, 2022.

  1. StardustBlaze

    StardustBlaze

    Joined:
    Feb 25, 2018
    Posts:
    16
    Hey everyone,
    I'm trying to make a 2D retro-styled game, but when I build and run the game, there isn't a way to exit the game and return to my desktop. I'm hoping to add a command where players can press the Escape key to bring up a "Do You Want to Exit" menu with the options of "Yes" and "No". What code should I add?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    Check some tutorials on making UI popups, accepting input from the popup and taking action.
     
  3. StardustBlaze

    StardustBlaze

    Joined:
    Feb 25, 2018
    Posts:
    16
    Okay, thanks