unity-physicscore2d-layers-api

Reference public members and signatures for Unity 2D PhysicsLayers and PhysicsMask.

730|105|Updated Mar 4, 2017
One-click install
npx skills add https://github.com/Unity-Technologies/PhysicsExamples2D --skill unity-physicscore2d-layers-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-physicscore2d-layers-api
Source: https://github.com/Unity-Technologies/PhysicsExamples2D/tree/main/.claude/skills/unity-physicscore2d-layers-api
Command: npx skills add https://github.com/Unity-Technologies/PhysicsExamples2D --skill unity-physicscore2d-layers-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Retrieve and reference an authoritative, up-to-date API surface for Unity's 2D physics layers and masks, including member names, signatures, and inline documentation.

Core Features & Use Cases

  • Comprehensive API surface: Exposes Unity.U2D.Physics.PhysicsLayers and Unity.U2D.Physics.PhysicsMask with all public members and signatures.
  • Version-aligned docs: Reflects Unity 6000.5 API surface to support cross-version development and migration tasks.
  • Use Case: When implementing layer-based collision rules, you can look up layer names, ordinals, and mask behavior exactly as defined in the API surface.

Quick Start

Consult the generated API surface to review all members, signatures, and docs for Unity.U2D.Physics.PhysicsLayers and Unity.U2D.Physics.PhysicsMask.

Frequently Asked Questions about unity-physicscore2d-layers-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Unity 2D physics layers for layer-based collision masking?

Unity 2D physics layers define specific collision rules by exposing layer names and ordinals via the PhysicsLayers API, allowing you to implement precise layer-based collision masking. The PhysicsMask type defines the mask behavior for these layers.

What is the difference between PhysicsLayers and PhysicsMask in Unity 2D physics?

PhysicsLayers exposes layer names and ordinals, while PhysicsMask defines the mask behavior for layer-based collision rules. Both are part of the Unity.U2D.Physics namespace in the PhysicsCore2D API.

How do I look up layer names and ordinals in Unity 6000.5?

You look up layer names and ordinals by consulting the public members and signatures of the Unity.U2D.Physics.PhysicsLayers type. This API surface provides the definitive reference for layer-name lookups in Unity 6000.5.

Does the PhysicsCore2D API support cross-version development for 2D collision layers?

Yes, the PhysicsCore2D API supports cross-version development by providing a version-aligned API surface reflecting Unity 6000.5. This ensures software engineers can manage migration tasks and maintain layer-based collision rules across different Unity versions.

What are the limitations of using Unity 2D physics layers for collision filtering?

The primary limitation is that the API surface is strictly aligned with Unity 6000.5, meaning public members and signatures for PhysicsLayers and PhysicsMask may differ in older or newer Unity versions, potentially affecting cross-version compatibility.