Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

OnTriggerEnter2D isn't called consistently

$
0
0
Hey guys,

I need your help! I'm two days with this problem, I don't know what to do. =/

I have two objects: Player and Enemy (Spawn). When I press play for the first time, the Animation works very well at the collision.. But when a press play for the second time, sometimes works, sometimes not.

Please see it:

(Player)
void OnTriggerEnter2D(Collider2D collider)
{
Debug.Log("Before if");
if (collider.gameObject.tag == "Enemy")
{
Debug.Log("After if");...

OnTriggerEnter2D isn't called consistently

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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