In the tutorial of the 2D Roguelike game, where is the player gameobject instantiated in the code?

The player character is not instantiated on any levels.

I tried changing between levels with and without enemies, but still not instantiated.
When an enemy is instantiated in the level the following error message shows up:

NullReferenceException: Object reference not set to an instance of an object
Enemy.Start () (at Assets/Scripts/Enemy.cs:14

This error message shows up as many times as there are enemies on the board.

I have gone through the tutorial videos from start to finish several times now, but I cannot find where the player is actually spawned into the level. What am I missing?

In the beginning of part 8, he puts the player prefab in the hierarchy, I think it stays there from that point, which means the player doesn’t have to be instantiated in the code.

I had the same issue until i realized my mistake in the Game manager script.

Turns out i wasn’t setting the instance of the game manager because of a simple bit of syntax. Coming off the back of coding in VBA where a if statment uses one = , i had missed the c# way of doing things.

Basically the double == was missing from the the below code .

Check that to see if it solves your issue. @wolfcamoedsheep @nickazoid

void Awake() { if (instance == null)