Main menu not dissapearing after clicking play, works fine in the editor

Hi, im pretty new to Unity and i came across a bug in my project.
I created a main menu - a simple one with a play, options and quit buttons.
After clicking “Play” in the build version the whole menu screen is still visible, but i hear sounds from my main scene + i see the UI (Health bar, minimap and crosshair) The play button remain “clicked” as you can see.

Screenshot: Imgur: The magic of the Internet

Everything works fine in the editor, after clicking play the game just loads the main scene with my character etc. No bugs.

Here is my main menu script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class MainMenu : MonoBehaviour
{
    public void Play()
    {
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
    }

    public void Quit()
    {
        Application.Quit();
    }
}

The scenes are in the correct order (0 - Intro, 1 - Main Menu, 2 - Game)

Does anybody have an idea what could be the problem here?

edit: I builded the game just with the game map enabled - now i have a black screen with the UI elements visible

Locate the player.log file for your built and check for any error message: Unity - Manual: Log files

1 Like

Yeah i have a lot of errors like this:

NullReferenceException: Object reference not set to an instance of an object
  at UnityEngine.Rendering.Universal.UniversalRenderPipeline.SetupPerFrameShaderConstants () [0x00089] in <52c1e664fb074c549d3a6f031a236173>:0 
  at UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) [0x00066] in <52c1e664fb074c549d3a6f031a236173>:0 
  at UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) [0x0001c] in <a14ba41591b145589fb99270dfefc571>:0 
  at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) [0x00046] in <a14ba41591b145589fb99270dfefc571>:0

I used the Render Pipeline converter on my scene to convert it to URP so i guess this could be the issue.
Any idea how to revert that change on my project or fix this? Im completely lost here

For anyone wondering, i scraped the project and recreated the menu from scratch and now its working. I still don’t know what was the issue