---
title: resource
framework: realitykit
role: symbol
role_heading: Instance Property
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: realitykit/computegraphcomponent/resource
---

# resource

The compute graph resource that defines the simulation.

## Declaration

```swift
var resource: ComputeGraphResource? { get set }
```

## Discussion

Discussion Assigning a new resource replaces the current graph and resets the simulation. Set to nil to detach the resource without destroying the entity.
