Search Unity

If button clicked open png?

Discussion in 'Scripting' started by JonathanGentile1, Jun 4, 2018.

  1. JonathanGentile1

    JonathanGentile1

    Joined:
    May 2, 2018
    Posts:
    7
    Hello,

    I'm designing a game that has a pause menu. Within the pause menu, I want the user to be able to click a button and a png opens. If they hit escape, the png closes and they're brought back to the pause menu.

    If clicked,
    Open png
    If escape is clicked
    Close png
    Then
    Display pause menu

    I wouldn't mind if the pause menu was still open while the png is because the game will be paused while any menu is open. I do have a working pause menu.
     
  2. AcePilot10

    AcePilot10

    Joined:
    Aug 11, 2016
    Posts:
    34
  3. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,187
    Not sure why you added a bunch of tags that have nothing to do with your question. Debugging? cache server?

    Solution is already pretty much mentioned.
    click button
    display image
    hit escape
    close image
    display pause menu