---
title: rootEntity
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/portalfactory/portalsetup/rootentity
---

# rootEntity

The root entity containing both portal and world entities as children.

## Declaration

```swift
let rootEntity: Entity
```

## Discussion

Discussion Add this entity to your scene to display the complete portal setup. Position and orient this entity to place the portal in your 3D space.

## See Also

### Accessing portal entities

- [portalEntity](realitykit/portalfactory/portalsetup/portalentity.md)
- [worldEntity](realitykit/portalfactory/portalsetup/worldentity.md)
