---
title: parent
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/hashierarchy/parent
---

# parent

The parent entity.

## Declaration

```swift
@MainActor @preconcurrency var parent: Entity? { get }
```

## Discussion

Discussion An entity has at most one parent entity. If an entity isn’t part of a hierarchy, or if it is a root entity, the parent property is nil. Use the setParent(_:preservingWorldTransform:) method to change an entity’s parent. Use the removeFromParent(preservingWorldTransform:) method to remove the parent. These methods automatically update the corresponding children collections of the new and old parent.

## See Also

### Managing the parent

- [setParent(_:preservingWorldTransform:)](realitykit/hashierarchy/setparent(_:preservingworldtransform:).md)
- [removeFromParent(preservingWorldTransform:)](realitykit/hashierarchy/removefromparent(preservingworldtransform:).md)
