Canvas Buttons not working after LevelLoad

I made a UI in the new canvas system.
The canvas is placed in the Menu screen and made into an Unity-Singleton with DontDestroyOnLoad(true). The canvas uses the “Screen Space - Camera” option.

While in menu screen everything works perfectly - the buttons get highlighted when hovered and can be clicked.
After loading a new Level the buttons do not work anymore. They don’t react on hovering or clicks.
There was no change done to the canvas while switching the level and I have no idea what is causing this trouble.

EDIT: I found a fix: somehow there was no eventsystem attached to the canvas, adding this made it work.
But I still want to know why. Why does it work without the eventsystem in the first scene and not in the second one?

Greetings,
lactus

You need one event system somewhere in your screen for the UI to work. Typically it should be on its own GameObject.

When you create a canvas the event system gameobject is created for you automatically.

I had the same issue, but I checked “Force Module Active” in “Standalone Input Module (Script)” in the EventSystem and it worked fine.

Tried all of these and didn’t fix it. Finally found my problem:

I’m using the standard 1st person controller asset, and it locks the cursor. Need to unlock the cursor when going back to the main menu.

In the past I have had:

  1. UI textbox/image is on top of button so it isn’t clickable
  2. DontDestroyOnLoad doing wonky things

Cheers

try adding Time.timeScale = 1; at Start(){}

For me, it was failing because I loaded level like this:

SceneManager.LoadScene("Preview", LoadSceneMode.Additive);

But now I load it with

LoadSceneMode.Single