OnTriggerEnter is not being called

I created box collider in both of gameObject and one of those have a Rigid Body, but even on Trigger is not working.

It was working when I was not reinstalled unity, because before reinstall it was working in editor but not after build, So I reinstall it because i saw in some answers of unity who told that reinstall unity then it can work, but after that, it is not also working in editor.

Please tell Why it is not worked?

You can try the following:

  • Make sure both colliders have onTrigger checked.
  • Both gameobjects are on layers that can interact between them (you can go into Edit > Project Settings > Physics to check that.)