---
title: ComputeGraphResource
framework: realitykit
role: symbol
role_heading: Class
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: realitykit/computegraphresource
---

# ComputeGraphResource

A loaded compute graph resource containing the graph definition, compiled pipelines, and all associated rendering assets.

## Declaration

```swift
final class ComputeGraphResource
```

## Overview

Overview Load a ComputeGraphResource from a file URL using init(contentsOf:bundle:), then assign it to a resource to drive a simulation. let resource = try await ComputeGraphResource(contentsOf: url) var component = ComputeGraphComponent(resource: resource) entity.components.set(component)

## Topics

### Structures

- [ComputeGraphResource.BufferInfo](realitykit/computegraphresource/bufferinfo.md)
- [ComputeGraphResource.Dependencies](realitykit/computegraphresource/dependencies.md)

### Initializers

- [init(contentsOf:)](realitykit/computegraphresource/init(contentsof:).md)
- [init(contentsOf:bundle:)](realitykit/computegraphresource/init(contentsof:bundle:).md)
- [init(graph:pipelines:dependencies:)](realitykit/computegraphresource/init(graph:pipelines:dependencies:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
