Create and debug a sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary that uses 2D physics with the LowLevelPhysics2D API.
Note: This documentation is about writing C# scripts using the LowLevelPhysics2D API. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to 2D physics instead.
| Topic | Description |
|---|---|
| Create a physics world | Create a new world to add 2D physics objects to, or fetch the default world Unity automatically creates. |
| Create a physics object | Create a 2D physics body, then attach shapes to the body. |
| Add a sprite | Add a SpriteRenderer component to a GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info See in Glossary that has a physics script attached. |
| Move a GameObject | Configure a 2D physics script to update the Transform componentA Transform component determines the Position, Rotation, and Scale of each object in the scene. Every GameObject has a Transform. More info See in Glossary of a GameObject. |
| Draw a debug visualization of objects | Configure how Unity draws 2D physics objects in the Unity Editor or at runtime, and draw your own shapes. |
| Combine shapes | To combine physics shapes into a compound shape, create a composer using a PhysicsComposer object. |
| Connect objects with joints | Create a connection or constraint between two physics objects. |
| Destroy objects and manage memory | Destroy a world, body, and shape when you no longer need them, and free up memory when necessary. |