# ChangeGameObjectParentEventArgs(int, Scene, int, Scene, int)

> Constructs a new instance.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public ChangeGameObjectParentEventArgs(int instanceId, Scene previousScene, int previousParentInstanceId, Scene newScene, int newParentInstanceId)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the [GameObject](/engine/6000.0/script-reference/unityengine/gameobject.md) whose parent changed. Note that this is not the instance ID of the [Transform](/engine/6000.0/script-reference/unityengine/transform.md) component.**** (\[Scene]\(/engine/6000.0/script-reference/unityengine/scenemanagement/scene)): The scene containing the previous parent. This is useful to detect whether a [GameObject](/engine/6000.0/script-reference/unityengine/gameobject.md) was moved to another scene.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the [GameObject](/engine/6000.0/script-reference/unityengine/gameobject.md) that was the previous parent of the target. Note that this is not the instance ID of its [Transform](/engine/6000.0/script-reference/unityengine/transform.md).**** (\[Scene]\(/engine/6000.0/script-reference/unityengine/scenemanagement/scene)): The [Scene](/engine/6000.0/script-reference/unityeditor/searchservice/scene.md) containing the new parent. This is useful to detect whether a [GameObject](/engine/6000.0/script-reference/unityengine/gameobject.md) was moved to another scene or moved to the root of a scene.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The instance ID of the [GameObject](/engine/6000.0/script-reference/unityengine/gameobject.md) that is the new parent of the target. Note that this is not the instance ID of its [Transform](/engine/6000.0/script-reference/unityengine/transform.md).
