The 2D Physics ProfilerA window that helps you to optimize your game. It shows how much time is spent in the various areas of your game. For example, it can report the percentage of time spent rendering, animating, or in your game logic. More info
See in Glossary module displays information about the 2D physics that the physics engineA system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More info
See in Glossary has processed in your 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. This information can help you diagnose and resolve performance issues or unexpected discrepancies related to the 2D physics in your Scene.
The 2D Physics Profiler module’s chart is divided into nine categories. To change the order of the categories in the chart, you can drag and drop them in the chart’s legend. You can also click a category’s colored legend to toggle its display.
Chart | Description |
---|---|
Total Bodies | Total number of Rigidbody2Ds in the Scene |
Active Bodies | Total number of active Rigidbody2Ds in the Scene. |
Sleeping Bodies | Total number of sleeping Rigidbody2Ds in the Scene |
Dynamic Bodies | Total number of dynamic Rigidbody2Ds in the Scene. A dynamic Rigidbody2D is the most interactive type of Rigidbody2D. Gravity and forces affect it, and is the most resource intensive. |
Kinematic Bodies | Total number of kinematic Rigidbody2Ds in the Scene. A kinematic Rigidbody2D is designed to move under simulation: gravity and forces do not affect this type of Rigidbody2D, and you need to use scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info See in Glossary to control how it behaves. |
Static Bodies | Total number of static Rigidbody2Ds in the Scene. A static body does not move under simulation and is the least resource-intensive type of Rigidbody2D. |
Contacts | Total number of contacts. A contact is a pair of CollidersAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info See in Glossary that either touch or overlap. To solve contacts that overlap, the physics engine applies impulses to keep them touching but not overlapping. |
Discrete Island Count | Total number of discrete islands. The physics engine groups contacts into islands, which it then solves. A contact island is made up of contacts that are connected together, but they do not connect via static Rigidbody2Ds, which act as a cut-off. A discrete island is made up of Rigidbody2Ds that use the discrete collision detectionA collision detection method that calculates and resolves collisions based on the pose of objects at the end of each physics simulation step. More info See in Glossary mode. If you use the multi-threaded physics option, too many contact islands are bad for performance because the physics engine solves each island as a job. |
Continuous Island Count | Total number of continuous islands. This is identical to Discrete Island Count except that it only applies to Rigidbody2Ds that use the Continuous collision detectionA collision detection method that calculates and resolves collisions over the entire physics simulation step. This can prevent fast-moving objects from tunnelling through walls during a simulation step. More info See in Glossary mode. |
When you select the 2D Physics Profiler module, the details pane below it displays a breakdown of where your application spent time on 2D physics in the selected frame. In addition to a more detailed breakdown of the chart categories listed in the previous table, there is the following additional information:
Data | Description |
---|---|
Discrete Bodies | The number of Rigidbody2Ds that use the Discrete collision detection mode. |
Continuous Bodies | The number of Rigidbody2Ds that use the Continuous collision detection mode. |
JointsA physics component allowing a dynamic connection between Rigidbody components, usually allowing some degree of movement such as a hinge. More info See in Glossary |
The number of Joint2Ds in the Scene. |
Static Shapes | The number of static shapes in the Scene. A shape is a primitive shape that the 2D physics engine creates. A Collider2D might produce single primitive shapes, or multiple primitive shapes. To see the shape count of a Collider2D, you can either look in the Inspector, or use Collider2D.shapeCount in a script. A static shape is one that is attached to a static Rigidbody2D. Static shapes are typically used for non-moving physics geometry such as platforms. |
Active Shapes | The number of active shapes in the Scene. An active shape is a shape attached to a Rigidbody2D that is not sleeping. Static shapes are always inactive because a Static Rigidbody2D is always asleep. |
Sleeping Shapes | The number of sleeping shapes in the Scene. A sleeping shape is a shape that’s attached to a Rigidbody2D that is sleeping. It is the opposite of an active shape. |
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.