I have a script linked to a button… Actually two… But here’s my problem: The game runs with no errors (good) The events are being called (good, found out by the function name being shown) The functions are not doing anything? (bad)
Code in both scripts:
MenuButton:
using UnityEngine;
using System.Collections;
public class MenuButton : MonoBehaviour {
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
void Click(int id)
{
Debug.Log(id);
UnityEngine.SceneManagement.SceneManager.LoadScene(id);
}
}
ButtonHover:
using UnityEngine;
using System.Collections;
public class ButtonHover : MonoBehaviour {
public AudioSource HoverSound;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
void Hover()
{
HoverSound.Play();
}
}
Both are c#.
https://i.gyazo.com/20b15e8d334746b52d560b7357d825b9.png
(By the way I know how to put an image in, unity won’t let me do it by url for some reason.)
UPDATE:
It appears that no scripts are working or outputting errors. What is going on? Also I tried restarting Unity twice already.