Hey, Excuse my English
i was watching da flappyBird tutorial on unity learn section .
but i’m gettin an error on Restarting the Level when the bird die the error is Scene not Loaded
this is my Code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class BirdJumping : MonoBehaviour {
private Rigidbody rb;
public float UpForce;
public static bool isDead = false;
public bool test;
void Start () {
rb = GetComponent ();
}
void Update () {
if (Input.GetMouseButtonDown (0) && isDead == false)
{
rb.velocity = new Vector3 (0, 0, 0);
rb.AddForce (new Vector3 (0, UpForce, 0));
}
if (Input.GetMouseButtonDown (0) && isDead == true)
{
Application.LoadLevel (“Main”);
}
}
void OnCollisionEnter(Collision collision)
{
isDead = true;
}
i tried SceneMagner . but still gettin the same Error
and the Scene is in the Build Settings .
Notice (he didn’t do it like me in the tutorial , but i tried his codes and still getting the same error xD)
Are you sure you have a scene in the build settings called exactly “Main”?