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

Resolved Buttons for GUI only work in Main Menu despite the Main Menu being in a different scene

Discussion in 'UGUI & TextMesh Pro' started by LordAdewin, Apr 28, 2023.

  1. LordAdewin

    LordAdewin

    Joined:
    Mar 3, 2023
    Posts:
    2
    I am using Unity 3D
    I currently have my game set up so that there are 2 scenes, 1 scene is the Main Menu, and the other is the actual game. I have it set up so that once the "Play" button is pressed the Main Menu scene gets removed and the actual game gets set as the active scene.

    The game I'm making is an RTS, and I'm setting up the building menu UI. For some reason the button to build things only works in the Main Menu, despite the Main Menu being a completely different scene. Once the actual game scene loads the button stops being interactable for some reason.

    I have very little experience with Unity and C#, and this is a student project. I would greatly appreciate any help in trying to fix this. I have no idea what I'm doing wrong.
    Unity Help-1.jpg Unity Help-2.jpg Unity Help-3.jpg Unity Help-4.jpg
     
  2. LordAdewin

    LordAdewin

    Joined:
    Mar 3, 2023
    Posts:
    2
    I figured it out, the event manager was in the Main Menu, so when the Main Menu scene removed itself it also removed the event manager. Making all subsequent buttons useless.