Version: Unity 6.3 LTS (6000.3)
Language : English
Create an object with the LowLevelPhysics2D API
Move a GameObject with the LowLevelPhysics2D API

Add a sprite to a LowLevelPhysics2D API object

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.

After you create a physics object, to add a spriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
, add a Sprite Renderer component. Follow these steps:

  1. In the Hierarchy window, select the 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
    with the LowLevelPhysics2D API script.
  2. Select Add Component.
  3. Select Rendering > Sprite Renderer.

You can also drag a sprite asset in the Project window to the GameObject in the Hierarchy window. This approach creates a new GameObject as a child of the physics body GameObject.

By default the sprite doesn’t move with the physics object. To make the sprite move, refer to Move a GameObject with the physics API.

Additional resources

Create an object with the LowLevelPhysics2D API
Move a GameObject with the LowLevelPhysics2D API