Hi there guy ,
So I got a wierd problem here;
After selecting an NPC in the scene view, while the game is running (to see the editor handles representing their vision), I have a “Ghost”-Object somewhere in the game.
All of my NPCs are created from prefab so they have (Clone) after the name. But this one has (Clone)(Clone) and its position is (0,0,0), but it’s neither in my hierarchy, nor is there an object at zero.
Since my NPCs have Tags GameObject.FindGameObjectsWithTag finds this npc. It doesn’t have the required components so i get a null-reference exception trying to access it after continuing the game.
Ofc I can make a nullpoint check for this component (or just ignore it and select an npc) but it’s still pretty messy and this doesn’t look like intended behaviour to me^^
Is it some temporary object internally created by unity? And shouldn’t this be excluded from the FindWithTag search than?