What problem does it solve?
Setting up Unity's PhysicsCore2D configuration is error-prone: the PhysicsCoreSettings2D asset, 64-bit physics layers, collision matrices, and default body/world definitions must be created and assigned correctly, and many API property names (such as sleepingAllowed or simulationSubSteps) differ from older Physics2D conventions. This Skill provides verified guidance for configuring every section of the settings asset and accessing it from C# code.
Core Features & Use Cases
- Settings Asset Setup: Step-by-step creation of the PhysicsCoreSettings2D ScriptableObject, assignment in Project Settings, and editing via Inspector or Project Settings.
- Layer and Collision Matrix Configuration: Enable 64-bit PhysicsMask layers, name layers, and query masks at runtime with PhysicsLayers.GetLayerMask and GetLayerOrdinal.
- Default Definitions and Runtime Access: Read physicsBodyDefinition and physicsWorldDefinition from the settings asset, or construct definitions with useSettings:true, then create worlds and bodies with tuned gravity, sub-steps, CCD, and debug drawing options.
- Use Case: You are building a fast-paced 2D platformer and need high-accuracy simulation. Use this Skill to configure a PhysicsWorldDefinition with 3 simulation sub-steps, continuous collision, and tuned contact frequency, then create the world from those settings.
Quick Start
Ask the AI to show how to create and assign a PhysicsCoreSettings2D asset and configure a high-accuracy PhysicsWorldDefinition for your Unity 2D physics project.