- Home /
LoadOnClick Script doesnt appear in a Canvas Function
I'm trying to create a menu and I'm following the tutorials. Problem is, I created the script but I can't use it as a function in the OnClick section. There should be a new function called LoadOnClick with my script but It's not there.
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class LoadOnClick : MonoBehaviour {
public void LoadScene(int level)
{
Application.LoadLevel(level);
}
}
Here's an image that show my problem:
2015-11-04.png
(165.9 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612043917im_/https://answers.unity.com/themes/thub/images/avi.jpg)