Create
Create a body using _defaultDefinition in the specified world.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
Create(PhysicsWorld)
Create a body using _defaultDefinition in the specified world.
public static PhysicsBody Create(PhysicsWorld world)
Parameters
The world to create the body in.
Returns
Type | Description |
|---|---|
| PhysicsBody | The created body. |
Create(PhysicsWorld, PhysicsBodyDefinition)
Create a body in the specified world.
public static PhysicsBody Create(PhysicsWorld world, PhysicsBodyDefinition definition)
Parameters
The world to create the body in.
The body definition to use.
Returns
Type | Description |
|---|---|
| PhysicsBody | The created body. |