經安全檢測,此網站為安全網站,請放心前往原始網址!

c# - Collision detection not working in Unity 2D - Stack Overflow

Unity has replicated all of the physics methods for 2D with the word "2D" stuck onto the end! So for your example, it should be changed to: void OnCollisionEnter2D(Collision2D collision) And the same with basically any other 2D physics thing.

stackoverflow.com

網址安全性掃描由 google 提供