unity-physicscore2d-world-api

Provides the Unity 6000.5 PhysicsCore2D API reference for World and Simulation types.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity 6000.5's PhysicsCore2D API (Unity.U2D.Physics) postdates most AI training data, so code assistants often hallucinate member names, signatures, or behaviors. This Skill supplies the authoritative, auto-generated API surface for World and Simulation types so generated code matches the real engine API.

Core Features & Use Cases

  • Complete API Reference: Lists every property, field, and method with signatures, parameters, and return values for PhysicsConstants, PhysicsCoreSettings2D, PhysicsWorld, and PhysicsWorldDefinition.
  • Authoritative Documentation: Generated directly from Unity 6000.5.0b9 UnityEngine.PhysicsCore2DModule.xml, including official doc summaries and links to Unity ScriptReference pages.
  • Use Case: When writing a Unity 2D physics script that creates a PhysicsWorld, configures gravity and simulation workers, or performs geometry casts, the assistant consults this reference to emit correct member names like PhysicsWorld.defaultWorld, simulationWorkers, and CastGeometry overloads instead of guessing.

Quick Start

Ask the assistant to write Unity 6000.5 PhysicsCore2D code that creates a physics world and casts a circle through it, and it will use this reference for correct API calls.

Frequently Asked Questions about unity-physicscore2d-world-api

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

FAQPage Schema
How do I create and simulate a PhysicsWorld in Unity 6000.5?

Use PhysicsWorld with a PhysicsWorldDefinition to configure gravity, simulation workers, and sub-steps, or access the automatically created PhysicsWorld.defaultWorld. This reference lists every property and method signature so generated code matches the real Unity.U2D.Physics API.

What is the PhysicsCore2D API in Unity 6000.5?

PhysicsCore2D is Unity's newer 2D physics API in the Unity.U2D.Physics namespace, distinct from the older Physics2D component API. It centers on types like PhysicsWorld, PhysicsCoreSettings2D, and PhysicsWorldDefinition for world management and simulation.

How do I cast geometry through a Unity 2D physics world?

Call PhysicsWorld.CastGeometry overloads with CircleGeometry, CapsuleGeometry, or PolygonGeometry, plus a translation, QueryFilter, WorldCastMode, and allocator. The method returns a NativeArray of cast results that must be disposed after use.

Does PhysicsCore2D replace the old Physics2D component API?

PhysicsCore2D is a separate newer API generation; the repository keeps OldPhysics2D examples alongside PhysicsCore2D projects. Code written for Rigidbody2D and Collider2D components does not directly transfer to the Unity.U2D.Physics world-based model.

Why does my AI assistant generate wrong Unity 6000.5 physics code?

The PhysicsCore2D API postdates most model training data, so assistants guess member names. This Skill supplies the auto-generated API surface from Unity 6000.5.0b9 as the source of truth for signatures and documentation.