<!--
{
  "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/WorldComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation14WorldComponentV"
  },
  "title" : "WorldComponent"
}
-->

# WorldComponent

A component that defines a portal world.

```
struct WorldComponent
```

## Overview

This component separates an entity and its descendants from the default world,
allowing it to only be visible through a portal.

Use a [`PortalComponent`](/documentation/RealityKit/PortalComponent) and point its [`targetEntity`](/documentation/RealityKit/PortalComponent/targetEntity) to this
entity to render this world.

See [`PortalComponent`](/documentation/RealityKit/PortalComponent) for information about example usage, clipping, crossing,
and lighting.

## Topics

### Initializers

[`init()`](/documentation/RealityKit/WorldComponent/init())

## Relationships

### Conforms To

[`Component`](/documentation/RealityKit/Component)

---

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)