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

UI buttons disable when building my project.

Discussion in 'Editor & General Support' started by Meijer, Jan 8, 2019.

  1. Meijer

    Meijer

    Joined:
    Jun 11, 2015
    Posts:
    15
    Hello,

    I'm making a 2D horror game, called The Darkest Dungeon. The dev process is going pretty well, but i found out that when I build and run it on Windows, the UI buttons (Pause, Retry and the Pause menu) will become disabled for some reason. They are still visible, but not interactable. Is this a bug yet to be undiscovered? I searched the forums for a possible answer, but it seems I am the first to encounter this problem.

    As I am writing this thread, I noticed that my Start menu buttons do work. So I suppose it's related to scene management? Perhaps the Unity builder thinks it has to remember the buttons from the last scene (my Main menu), while disabling the UI in the next scene... Any help is welcome, as I am not an expert with Unity.

    I could post screenshots of my game and the UI, but I don't think it'll be of any help, as it's a pretty straightforward issue. If you'd like me to post any screenshots of my settings/code, please let me know.

    Thank you in advance.
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    UI input only works when you have an existing EventSystem. Unity is pretty good about automatically making EventSystems for you, but sometimes when a scene with an EventSystem gets unloaded, another scene with UI thinks the EventSystem is still there.

    Just make sure you have an EventSystem in every scene with UI, or make sure your EventSystem never gets destroyed or unloaded.

    Also, sorry to break it to you, but there is already a wildly popular rogue-like game called Darkest Dungeon.
     
    Meijer likes this.