This provides a common method to retrieving layer information. If a PhysicsCoreSettings2D asset is assigned then the full layers (PhysicsCoreSettings2D.physicsLayerNames) will be used if PhysicsCoreSettings2D.usePhysicsLayers is also active. If no PhysicsCoreSettings2D asset is assigned then the global layers (See LayerMask) will be used.
| Property | Description |
|---|---|
| InvalidLayerOrdinal | Indicates an invalid layer ordinal. This is typically used when retrieving a layer ordinal but a name could not be found. |
| Method | Description |
|---|---|
| GetLayerMask | Get a PhysicsMask for the specified layer name(s). |
| GetLayerName | Get a layer name for the specified layer ordinal (index). |
| GetLayerOrdinal | Get a layer ordinal (index) for the specified layer name. This is not a 32-bit mask but simply the layer ordinal (index) associated with the specified layer name. |