Question by
Direclaw · Feb 18, 2016 at 07:10 PM ·
scripting problemupdate problem
OnCollisionEnter2D not working after update.
I updated Unity many times before checking this script, so I don't know which specific update made the script stop working. But when I tried out, all the OnCollisionEnter2D of my game stopped working consistently and started working randomly and rarely. On every 100 collisions, 1 of them returns the script.
public virtual void OnCollisionEnter2D(Collision2D other) {
other.collider.GetComponent<Body>().TakeDamage(collisionDamageType, collisionDamage);
Debug.Log("Hit");
}
Comment
Your answer
Follow this Question
Related Questions
PLEAASEE I NEED HELP!!! How to turn Mesh Renderer of cubes on and off by pushing buttons? 1 Answer
Problemas con Input.GetKeyDown() 0 Answers
I want my script to wait 2 seconds before continue in a condition, in update, using C# 2 Answers
Help I've Lost all Hope, A script stopped working on my Player Character Prefab! 0 Answers
Why is my transform null in Update? 1 Answer