Quantcast
Channel: Answers for "My player object is getting clone which doesn't show up in inspector"
Viewing all articles
Browse latest Browse all 9

Answer by Selzier

$
0
0
I was having this error about every 5 minutes, depending on what I was working on. For example, when working with Animator Controller, I had to restart Unity almost every time I ran the game. It seems to fix the problem adding the following code to one of the main Player's Scripts: GameObject[] remaining = GameObject.FindGameObjectsWithTag(Tags.player); foreach (GameObject clone in remaining) { if(clone.name == "Player_Aleysha(Clone)"){ GameObject.Destroy(clone); } }

Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>