My script keeps instantiating a clone of my hero, why?
So my game was working fine until I started messing around with my animations, I've been trying to locate the spot in my script to place the "Run" animation
anim.SetInteger("State",3); //Animates the Run for my Hero 1
But even after I delete that line of script the enemy keeps going to attack the clone instead of my hero and the clone doesn't show up visibly and cannot be interacted with. When I double-click the clone while the game is paused to locate it all of it's inspector stuff is greyed out and it doesn't appear in the Hierarchy or my Project folders. It used to pop-up with an error message,
"Null Reference Exception: Object of reference not set to an instance of object"
then send me to this line,
HeroToAttack.GetComponent().TakeDamage(calc_damage);
Please Help!
Your answer
Follow this Question
Related Questions
Bacteria/Cell Growth 1 Answer
2 d アニメーション 1 Answer
Unity 2D Animation Sprite positioning help 0 Answers