# ChangeGameObjectParentEventArgs

> A change of this type indicates that the parent of a GameObject has changed. This happens when Undo.SetTransformParent or SceneManager.MoveGameObjectToScene is used.

## Definition

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

```csharp
public struct ChangeGameObjectParentEventArgs
```

## Constructors

| Constructor                                                                                                                                                                                                                                                | Description                |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| [ChangeGameObjectParentEventArgs(UnityEngine.EntityId,UnityEngine.SceneManagement.Scene,UnityEngine.EntityId,UnityEngine.SceneManagement.Scene,UnityEngine.EntityId)](/engine/6000.7/script-reference/unityeditor/changegameobjectparenteventargs/ctor.md) | Constructs a new instance. |

## Properties

| Property                                                                                                                        | Description                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [entityId](/engine/6000.7/script-reference/unityeditor/changegameobjectparenteventargs/entityid.md)                             | The EntityId of the [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md) whose parent changed. Note that this is not the EntityId of the [Transform](/engine/6000.7/script-reference/unityengine/transform.md) component.                                      |
| [newParentEntityId](/engine/6000.7/script-reference/unityeditor/changegameobjectparenteventargs/newparententityid.md)           | The EntityId of the [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md) that is the new parent of the target. Note that this is not the EntityId of its [Transform](/engine/6000.7/script-reference/unityengine/transform.md).                                |
| [newScene](/engine/6000.7/script-reference/unityeditor/changegameobjectparenteventargs/newscene.md)                             | The [Scene](/engine/6000.7/script-reference/unityeditor/searchservice/scene.md) containing the new parent. This is useful to detect whether a [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md) was moved to another scene or moved to the root of a scene. |
| [previousParentEntityId](/engine/6000.7/script-reference/unityeditor/changegameobjectparenteventargs/previousparententityid.md) | The EntityId of the [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md) that was the previous parent of the target. Note that this is not the EntityId of its [Transform](/engine/6000.7/script-reference/unityengine/transform.md).                          |
| [previousScene](/engine/6000.7/script-reference/unityeditor/changegameobjectparenteventargs/previousscene.md)                   | The scene containing the previous parent. This is useful to detect whether a [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md) was moved to another scene.                                                                                                  |
