New to Unity and C# and having a facedesk of a time with an error...

Okay, so I was having zero problems with a tutorial series I have been following up until last night. I’ve been making an RPG using this series

and have had almost no issues. Well, last night i had an issue with a prefab and I deleted the prefab. Suddenly I am getting a script error and the console looks like this:


And the code it’s referencing is this

I don’t know what in the heck sort of magic I pulled off here…

If you deleted the prefab, then it’s reference in your instance of CharacterGenerator has been broken (since what it was pointing to has been deleted). So your script is trying to instantiate something that is null, hence the error.

You need to affect a new prefab to your instance of CharacterGenerator.

Here’s where my newness shows: How would I go about doing that? I created a new Character Prefab, but I don’t know how to affect a new prefab (the one I have created) in the script.