Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseThe Layers that this Collider2D will report collision or trigger callbacks for during a contact with another Collider2D.
When a contact occurs between two Collider2D, each Collider2D will get a collision or trigger callback. This options allows you to select which layer(s) will produce a callback.
The ability to limit which layers will result in a callback can reduce the complexity of the script inside the callback so that it can safely assume only specific layers will be reported. There is also a performance benefit in not performing callbacks that are not required.
These are all the physics callbacks which are affected by callback layers:
NOTES:
See Also: LayerMask.