# ApplySnapshot(Snapshot)

> Restore this world to the state captured in snapshot, in place. The world keeps the same handles, so any PhysicsBody, PhysicsShape and PhysicsJoint you already hold remain valid. Applying a snapshot taken from a different world means existing handles for this world may alias objects restored from the snapshot or report invalid. The snapshot image is fully validated before the world is touched, so a rejected snapshot leaves the world unchanged.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.6/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public bool ApplySnapshot(PhysicsWorld.Snapshot snapshot)
```

### Parameters

**** (\[Snapshot]\(/engine/6000.6/script-reference/unity/u2d/physics/physicsworld/snapshot)): A snapshot produced by [PhysicsWorld.CreateSnapshot](/engine/6000.6/script-reference/unity/u2d/physics/physicsworld/createsnapshot.md) on a compatible world.

### Returns

| Type                                                          | Description                                                                                                                                        |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Whether the world was restored. Returns false if the snapshot or world is invalid, or the image is rejected, in which case the world is unchanged. |

### Remarks

Validating and applying a snapshot processes the whole image, so this is not intended to be called at high frequency.
