So in my game I’m using a trigger as an object cleaner. Any platform that collide with that trigger will be moved back into the pool.
void OnTriggerEnter2D(Collider2D other) {
if (other.gameObject.tag == "Platforms") {
other.gameObject.SetActive (false);
}
}
The code has been working fine but I when I played the game in editor today this happens:
As you can see in the image, many platforms have moved past the object cleaner (the green bar) without being removed. This happen randomly: sometimes the platforms are removed correctly, but most of the time they just go past the bar and keep on going up. This bug is also happening to all other triggers in my game as well.
Physics collision between rigid bodies, on the hand, is still working normally (the player can still stand on platforms without falling through).
It might be because I just updated to 5.2.3 the day before yesterday, but I can’t be sure, since I coded a lot for the past 2 days. None of the game play codes are touched though, all I did was integrating unity services and other ads libraries.
Just want to know if other users are having the same problem as well and asking for insight on possible cause.