# SceneImportContext

> Additional import context for scene assets used in AssetPostprocessor.OnProcessScene(Scene, SceneImportContext).

## Definition

* **Type:** Struct
* **Namespace:** [UnityEditor.Build.Content](/engine/6000.7/script-reference/unityeditor/build/content.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public struct SceneImportContext
```

## Remarks

Unity passes an instance of this struct to [AssetPostprocessor.OnProcessScene(Scene, SceneImportContext)](/engine/6000.7/script-reference/unityeditor/assetpostprocessor/onprocessscene.md) for every scene it processes during a Player build or in Play mode.

Additional Resources: [AssetPostprocessor.OnProcessScene(Scene, SceneImportContext)](/engine/6000.7/script-reference/unityeditor/assetpostprocessor/onprocessscene.md), [ProcessSceneMode](/engine/6000.7/script-reference/unityeditor/build/content/processscenemode.md)

The following example logs a message when a scene is processed while Awake has been called before the callback.

## Examples

```csharp
using UnityEditor;
using UnityEditor.Build.Content;
using UnityEngine;
using UnityEngine.SceneManagement;

class MySceneProcessor : AssetPostprocessor
{
    public void OnProcessScene(Scene scene, SceneImportContext sceneContext)
    {
        if (sceneContext.awakeDidRun)
            Debug.Log($"Processing {scene.name} with Awake already called.");
    }
}
```

## Properties

| Property                                                                                                       | Description                                                                   |
| -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [awakeDidRun](/engine/6000.7/script-reference/unityeditor/build/content/sceneimportcontext/awakedidrun.md)     | Indicates whether Unity has already called Awake on the objects in the scene. |
| [loadingReason](/engine/6000.7/script-reference/unityeditor/build/content/sceneimportcontext/loadingreason.md) | Indicates the reason for which the scene is being loaded.                     |
