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.

Physics.GetIgnoreLayerCollision

public static bool GetIgnoreLayerCollision(int layer1, int layer2);

Description

Are collisions between layer1 and layer2 being ignored?

Returns the value set by Physics.IgnoreLayerCollision or in the Physics inspector.