unity button, debugging works, but packaging doesn't

Question:

Unity button, debugging works, but packaging doesn’t.
All the buttons can work while running in the unity editor.
However, after I package it on windows, Button1 and Button2 didn’t work.

Thanks♪(・ω・)ノ

public LoadingUI LoadingUI;
public MenuMusic MenuMusic;

public void Button1()  //Load the new scene and unload the menu.
{
    if (LoadingUI == null)
    {
        LoadingUI = FindObjectOfType<LoadingUI>();
    }
    if (MenuMusic == null)
    {
        MenuMusic = FindObjectOfType<MenuMusic>();
    }
    LoadingUI.TemplateScene(5,"Template1","A1","Launcher"); //Load the new scene and unload the menu.
    MenuMusic.Close(); //close music
}

public void Button2()
{
    if (MenuMusic == null)
    {
        MenuMusic = FindObjectOfType<MenuMusic>();
    }
    MenuMusic.Close(); //close music
}

public void Button3()
{
    Application.Quit();  //exit. Only this could work after packed.
}