Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Physics2D.GetIgnoreCollision

public static bool GetIgnoreCollision(Collider2D collider1, Collider2D collider2);

Parameters

collider1 The first collider to compare to collider2.
collider2 The second collider to compare to collider1.

Returns

bool Whether the collision detection system will ignore all collisions/triggers between collider1 and collider2 or not.

Description

Checks whether the collision detection system will ignore all collisions/triggers between collider1 and collider2 or not.