So I'm working on the Scene scripts of my final and I'm now working on my buttons script. My ButtonScript is this
I've put the script on a gameobjected titled ButtonHolder and on my button I would drag it into my OnClick () box, my Script name ButtonScript appears in the function area but the names of my commands won't appear as shown below. Is there a way to fix this
PHP Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class ButtonScript : MonoBehaviour
{
void Start()
{
SceneManager.LoadScene("Game", LoadSceneMode.Single);
}
void About()
{
SceneManager.LoadScene("AboutScene", LoadSceneMode.Single);
}
void Quit()
{
Application.Quit();
}
void Home()
{
SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
}
void Enemies()
{
SceneManager.LoadScene("Enemy", LoadSceneMode.Single);
}
void HowToPlay()
{
SceneManager.LoadScene("HowToPlay", LoadSceneMode.Single);
}
Comment