I uploaded the levelLoader file to the gameobject. Still, when I drag the script file onClick Event, the no function is null. Why? Can anybody help me?
C# code:
using UnityEngine;
using System.Collections;
public class LevelLoader : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
public void LoadLevel(int a)
{
Application.LoadLevel(a);
}
public void Quit()
{
Application.Quit();
}
}
Correct me where I am wrong. I am following this racing car game tutorial. At 7:58 he added this event. Please help me!!!