I want to do something, and for some reason I get an error:
NullReferenceException: Object reference not set to an instance of an object
Player:
public GoTo sentFrom;
private void Update()
{
transform.eulerAngles = new Vector3(0, 0, 0);
if (transform.position.y < -5)
{
sentFrom.GoToAuto("YouDied", "tuturial1");
}
}
GoTo:
static public string WentFrom;
public void GoToAuto(string to, string from)
{
WentFrom = from;
SceneManager.LoadScene(to);
}
Thank You :D