Resetting a level

HI Guys,

I’ve been following the Role-a-Ball tutorial and I’ve started expanding upon what they teach you in it. I’m trying to create a reset button that at the end of the game sets everything back the way it was. I’ve been able to reset the text, but not the pickup game objects. I get the following:

NullReferenceException: Object reference not set to an instance of an object
PlayerController.resetLevel () (at Assets/Scripts/PlayerController.cs:60)
PlayerController.FixedUpdate () (at Assets/Scripts/PlayerController.cs:32)

My code should go through every object with the tag “Pick Up” and set that to active.

    void resetLevel()
    {
        count = 0;
        resetText.text = "";
        winText.text = "";
        countText.text = "Count: " + count.ToString ();
        GameObject.FindGameObjectWithTag("Pick Up").SetActive(true);
    }

Are you destroying the pickup object?

Easy ways:
-Reload the whole shebang (scene).
-Create ‘spawner’ objects that spawn the pickups, player, etc. Destroy the already spawned stuff on reset (if they aren’t destroyed already).