---
title: targetEntity
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/portalcomponent/targetentity
---

# targetEntity

The root entity for the portal’s target world.

## Declaration

```swift
var targetEntity: Entity? { get set }
```

## Discussion

Discussion When the target entity is valid and has a WorldComponent, the portal renders with the target entity and its hierarchy tree. When the target entity doesn’t have a WorldComponent, the portal doesn’t render.
