# PhysicsScene2D

> Represents a single instance of a 2D physics Scene.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule
* **Implements:** [IEquatable\<PhysicsScene2D>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct PhysicsScene2D : IEquatable<PhysicsScene2D>
```

## Remarks

A 2D physics Scene owns all 2D physics component objects added to it and can perform a simulation of them as well as execute queries against them.  All of this functionality is isolated from any other physics Scene.  Using this, multiple independent physics Scenes can coexist.

## Properties

| Property                                                                                         | Description                                                                                                                        |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| [subStepCount](/engine/6000.7/script-reference/unityengine/physicsscene2d/substepcount.md)       | The number of simulation sub-steps that occurred  during the last simulation step.                                                 |
| [subStepLostTime](/engine/6000.7/script-reference/unityengine/physicsscene2d/substeplosttime.md) | The amount of simulation time that has been "lost" due to simulation sub-stepping hitting the maximum number of allowed sub-steps. |

## Methods

| Method                                                                                                 | Description                                                                                                            |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| [BoxCast](/engine/6000.7/script-reference/unityengine/physicsscene2d/boxcast.md)                       | Casts a box against colliders in the PhysicsScene2D, returning the first intersection only.                            |
| [CapsuleCast](/engine/6000.7/script-reference/unityengine/physicsscene2d/capsulecast.md)               | Casts a capsule against colliders in the PhysicsScene2D, returning the first intersection only.                        |
| [CircleCast](/engine/6000.7/script-reference/unityengine/physicsscene2d/circlecast.md)                 | Casts a circle against colliders in the PhysicsScene2D, returning the first intersection only.                         |
| [GetRayIntersection](/engine/6000.7/script-reference/unityengine/physicsscene2d/getrayintersection.md) | Cast a 3D ray against the 2D Colliders in the Scene.                                                                   |
| [IsEmpty](/engine/6000.7/script-reference/unityengine/physicsscene2d/isempty.md)                       | Determines whether the physics Scene is empty or not.                                                                  |
| [IsValid](/engine/6000.7/script-reference/unityengine/physicsscene2d/isvalid.md)                       | Determines whether the physics Scene is valid or not.                                                                  |
| [Linecast](/engine/6000.7/script-reference/unityengine/physicsscene2d/linecast.md)                     | Casts a line segment against colliders in the PhysicsScene2D, returning the first intersection only.                   |
| [OverlapArea](/engine/6000.7/script-reference/unityengine/physicsscene2d/overlaparea.md)               | Checks an area (non-rotated box) against Colliders in the PhysicsScene2D, returning the first intersection only.       |
| [OverlapBox](/engine/6000.7/script-reference/unityengine/physicsscene2d/overlapbox.md)                 | Checks a box against Colliders in the PhysicsScene2D, returning the first intersection only.                           |
| [OverlapCapsule](/engine/6000.7/script-reference/unityengine/physicsscene2d/overlapcapsule.md)         | Checks a capsule against Colliders in the PhysicsScene2D, returning the first intersection only.                       |
| [OverlapCircle](/engine/6000.7/script-reference/unityengine/physicsscene2d/overlapcircle.md)           | Checks a circle against Colliders in the PhysicsScene2D, returning the first intersection only.                        |
| [OverlapPoint](/engine/6000.7/script-reference/unityengine/physicsscene2d/overlappoint.md)             | Checks a point against Colliders in the PhysicsScene2D, returning the first intersection only.                         |
| [Raycast](/engine/6000.7/script-reference/unityengine/physicsscene2d/raycast.md)                       | Casts a ray against colliders in the PhysicsScene2D, returning the first intersection only.                            |
| [Simulate](/engine/6000.7/script-reference/unityengine/physicsscene2d/simulate.md)                     | Simulate physics associated with this [PhysicsScene2D](/engine/6000.7/script-reference/unityengine/physicsscene2d.md). |

## Static Methods

| Method                                                                                           | Description                                                                             |
| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
| [OverlapCollider](/engine/6000.7/script-reference/unityengine/physicsscene2d/overlapcollider.md) | Checks a Collider against Colliders in the PhysicsScene2D, returning all intersections. |
