<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PortalComponent/targetEntity",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV12targetEntityAA0F0CSgvp"
  },
  "title" : "targetEntity"
}
-->

# targetEntity

The root entity for the portal’s target world.

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

## Discussion

When the target entity is valid and has a [`WorldComponent`](/documentation/RealityKit/WorldComponent),
the portal renders with the target entity and its hierarchy tree.

When the target entity doesn’t have a [`WorldComponent`](/documentation/RealityKit/WorldComponent),
the portal doesn’t render.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)