Portal Problem


Hey guys, having an issue with the portals. I’ve attached some snippets to help with what i’m explaining.

I’ve gone through the code line by line but cant figure out what it’s problem is.

I’ve also attached a snippet of the console error i’m getting too.

I should also add that it works when going from scene 0 to 1 but doesn’t work when going from the second scene back to the first

Thanks in advance

The error is telling you that there is no NavMeshAgent attached to the ‘Core’ game object. I cannot see the ‘Core’ game object so I can only assume that that is the problem

Check to make sure that your Core does not have a tag of “Player”. It looks like the Portal is trying to access the NavMeshAgent on the Player, which it finds with GameObject.FindWithTag("Player");. If the core is also tagged Player, then it will not work.

Privacy & Terms