---
title: WorldComponent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/worldcomponent
---

# WorldComponent

A component that defines a portal world.

## Declaration

```swift
struct WorldComponent
```

## Overview

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 and point its targetEntity to this entity to render this world. See PortalComponent for information about example usage, clipping, crossing, and lighting.

## Topics

### Initializers

- [init()](realitykit/worldcomponent/init().md)

## Relationships

### Conforms To

- [Component](realitykit/component.md)

## See Also

### Portals

- [PortalMaterial](realitykit/portalmaterial.md)
- [PortalMaterial.FaceCulling](realitykit/portalmaterial/faceculling-swift.typealias.md)
- [PortalMaterial.TriangleFillMode](realitykit/portalmaterial/trianglefillmode-swift.typealias.md)
- [PortalComponent](realitykit/portalcomponent.md)
- [PortalCrossingComponent](realitykit/portalcrossingcomponent.md)
