文档

Unity Engine

Unity Engine

Configuring Physics Core 2D API scenes

Configure 2D physics objects and global settings, and attach custom data to physics objects.
阅读时间1 分钟最后更新于 1 个月前

Configure properties such as gravity, friction, position, and shape on a world, body, or shape using the Physics Core 2D API.
注意
This documentation is about writing C# scripts using the
Unity.U2D.Physics
API. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to 2D physics instead.

Topic

Description

Configure objects with definitionsCreate a definition object to configure properties such as gravity, friction, position, and shape.
Configure global Physics Core 2D API settingsTo configure layers, default definition values, and global settings, create and assign a Physics Core Settings 2D asset.
Attach custom data to objectsAttach values and physics masks to physics objects so you can fetch them later.

Additional resources