1
Support / Re: tk2dSpriteAnimator become null (sometimes)
« on: October 21, 2013, 02:11:54 pm »
Seems like the reference that has gone null
to stop the error I am now doing this,
the problem is I can't simulate the problem without adding large number of units to the screen. It does not happen if I have few units on the screen
As you can see from the previous code I am in the process of destroying the main game object when the health goes below 0.
what I am doing is playing death animation and at the end I am destroying the gameObject
to stop the error I am now doing this,
Code: [Select]
anim = gameObject.GetComponentInChildren<tk2dSpriteAnimator>();
the problem is I can't simulate the problem without adding large number of units to the screen. It does not happen if I have few units on the screen
As you can see from the previous code I am in the process of destroying the main game object when the health goes below 0.
what I am doing is playing death animation and at the end I am destroying the gameObject