- Home /
My Function is not showing up in the OnClick Menu 2017.2.0f
Hey guys, so I am trying to create a button that runs a function in my script. I dragged the object into the OnClick, and the script shows up, but not the function I put in there, only base GameObject functions. I looked this up, and the only response is that you can only use functions that return void, are public, and only take 0 or 1 parameters, but my function satisfies all those conditions, and it still doesn't show up. EDIT: Well, people asked to see the function. I didn't post it because I just described the whole thing..
public void SoundClick()
{
if (SoundManager.Instance.IsMuted())
{
unMuteButton.enabled = true;
muteButton.enabled = false;
SoundManager.Instance.ToggleMute();
}
else
{
unMuteButton.enabled = false;
muteButton.enabled = true;
SoundManager.Instance.ToggleMute();
}
SoundManager.Instance.PlaySound(SoundManager.Instance.hitButton);
}
Comment