---
title: PhysicsWorld.SceneLoadMode
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/sceneloadmode
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/sceneloadmode.md
last_updated: 2026-11-10
generated_at: 2026-11-11T17:40:00.028Z
locale: en-us
---

# PhysicsWorld.SceneLoadMode

> Options for what happens to bodies and worlds when a scene loads in Single mode, or when you open a scene in the Editor.

## Definition

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

```csharp
public enum PhysicsWorld.SceneLoadMode
```

## Remarks

A Single mode load closes every open scene, which destroys the GameObjects in them. Bodies and worlds are not GameObjects, so this setting decides which of them are destroyed at the same time.

Whatever the setting, a body or world is never destroyed when its owner is a GameObject, or a component on a GameObject, that the load keeps. The load keeps a GameObject that you moved to the DontDestroyOnLoad scene with [Object.DontDestroyOnLoad](/engine/7000.0/script-reference/unityengine/object/dontdestroyonload.md), or one that has [HideFlags.DontSave](/engine/7000.0/script-reference/unityengine/hideflags/dontsave.md) set. Any other owner does not keep its bodies and worlds, including an asset such as a ScriptableObject, even though the load does not unload the asset. You set a body's owner with [PhysicsBody.SetOwner](/engine/7000.0/script-reference/unity/u2d/physics/physicsbody/setowner.md) and a world's owner with [PhysicsWorld.SetOwner](/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/setowner.md). A world is also kept while it holds a body whose owner survives.

A body keeps its shapes and chains. A joint is destroyed when either of the two bodies it connects is destroyed. A world that is kept, including the default world, keeps any settings your scripts changed, such as its gravity.

This setting has no effect on an additive scene load, on unloading a scene, or on entering and exiting Play mode in the Editor. Additive loads and unloads never destroy bodies or worlds. Entering and exiting Play mode destroys every body and world and creates the default world again from the project settings. The one exception is entering Play mode with both Reload Domain and Reload Scene disabled, which keeps everything.

Set it in the project settings with [PhysicsCoreSettings2D.sceneLoadMode](/engine/7000.0/script-reference/unity/u2d/physics/physicscoresettings2d/sceneloadmode.md), and read it at runtime with [PhysicsWorld.sceneLoadMode](/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/sceneloadmode-1.md).

## Examples

```csharp
// Keep a body when the next scene loads, by giving it an owner that survives the load.
using UnityEngine;
using Unity.U2D.Physics;

public class KeepBodyAcrossScenes : MonoBehaviour
{
    PhysicsBody m_Body;
    int m_OwnerKey;

    void Start()
    {
        // Move this GameObject to the DontDestroyOnLoad scene so it survives a Single mode load.
        DontDestroyOnLoad(gameObject);

        // Create a body owned by this component, so the body is kept when a scene loads.
        m_Body = PhysicsWorld.defaultWorld.CreateBody();
        m_OwnerKey = m_Body.SetOwner(this);
    }

    void OnDestroy()
    {
        // An owned body can only be destroyed with the owner key that SetOwner returned.
        if (m_Body.isValid)
            m_Body.Destroy(m_OwnerKey);
    }
}
```

## Fields

| Value                                                                                                  | Description                                                                                                               |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| [Automatic](/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/sceneloadmode/automatic.md) | Destroys the bodies and worlds whose owner does not survive the load, apart from the default world, which is always kept. |
| [Manual](/engine/7000.0/script-reference/unity/u2d/physics/physicsworld/sceneloadmode/manual.md)       | Keeps every body and world, so your scripts decide what to destroy.                                                       |
