So why is my scene blank when I try to reload it?

The game is using OVR(Oculus Rift).
So here’s my scene:
https://i.imgur.com/BfzuvLe.jpg

Here’s the reset button:
https://i.imgur.com/mN0HIDU.jpg
The player just puts his hand on the button and it should reload the level.

Here’s the code:
https://i.imgur.com/afUBu8p.jpg

This is what I end up with when I restart it:
https://i.imgur.com/Q9eV2vf.jpg

Well, your console is indicating more than 999 errors, so those might have something to do with that?

No idea. I keep getting this:
https://imgur.com/a/IZgBzs8

Well you have only 1 reference type on that line, Re2, so that’s probably what is null.

1 Like

Yes, if you get errors, your game (are you making a car mechanic VR game?) does not work. I would suggest selecting the ‘Clear on Play’ and ‘Error Pause’ buttons on the console. This way, your game stops when there is an error, you will only get a few errors (ideally only one), and you only see errors, warnings, and info since the last start of the game. Fix the first error, and try again.

Make sure you’ve added your scene to the build settings, otherwise it won’t load.

Also, check your console for the errors.

1 Like

The only error Ive been getting is a null reference exception.

public class Reset : MonoBehaviour {
    Vector3 originalPos;

    public GameObject Floor;
    public GameObject Floor2;
    public GameObject AlternatorNode;
    public GameObject Alternator;
    public Transform spawnController;
    public GameObject Spawner;
    public GameObject Ghost;
    public GameObject LeftHand;
    public GameObject RightHand;

    int resetTime;
    public bool fallen;
    bool latched;
    public Reset2 Re2;
    bool placed;

    private void Start()
    {
        GameObject handR = GameObject.Find("LeftGrabber");
        resetTime = 1;
        fallen = false;
        latched = false;

        originalPos = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, gameObject.transform.position.z);
    }

    public void Update()
    {
        if (fallen==true)
        {
            resetTime -= 1;
        }
        if (resetTime < 1 && fallen==true || Re2.time==true)
        {
            Resetting();
        }
    }

    public void OnTriggerEnter(Collider col)
    {
        if (col.name == "Floor")
        {
            fallen = true;
        }

        if (col.name == "AlternatorNode")
         
        {
            print("Touched");

            Instantiate(Alternator, spawnController.position, spawnController.rotation);
            Destroy(this);

           
            //transform.position = originalPos;
        }


    }

    void Resetting()
    {
        fallen = false;
        transform.position = originalPos;
        resetTime = 1;
    }
   
}

Apparently with this part:

 if (resetTime < 1 && fallen==true || Re2.time==true)

So I noticed, when I reload a scene, you only see the skybox. When you have the game running, and click on the “clear flags” and change it, all your scene objects reappear. No matter if I have it on skybox or solid color.