RealityKit Basics: Loading content from Reality Composer Pro
Loading scenes and assets in our RealityView.
Overview
Reality Composer Pro is a scene composition tool that is bundled with Xcode. While technically optional (we can do most things directly in code) using it can save us a lot of development time. We can import and organize assets to use in our projects. We can create scenes to compose several assets together into a presentable product. RCP has valuable tools for working with model, materials, animations, particles, and much more.
If you started your project from a visionOS Xcode template, then you already have a package called RealityKitContent. There are two quick ways to open this tool.
- Xcode > Open Developer Tool > Reality Composer Pro. Then use the file menu to navigate to the package for your project.
- In your Xcode project, look for Packages / RealityKitContent in the project navigator. Click on the file
Package.realitycomposerpro. This will show a 3D view with a button in the top right “Open in Reality Composer Pro”.
Let’s create a new scene called “RKBasicsLoading”. We will use the Object Library to add some example models.
- Earth model: I scaled mine to 2x and positioned it 0.3 on the y axis.
- Moon model: I scaled mine to 0.5x and positioned it -0.3 on x and 0.6 on y.
- Base: I created a Box sized 0.8, then scaled it to 0.05 on the y. Then I positioned it -0.025 on the y axis.

We can load this named scene in our Reality View.
struct Example041: View {
var body: some View {
RealityView { content in
// Load a scene from the bundle
if let scene = try? await Entity(named: "RKBasicsLoading", in: realityKitContentBundle) {
// Make sure to add the scene to the content!
content.add(scene)
}
}
}
}Because I’m working in a volume, this isn’t placed where I’d expect. Our assets are placed relative to the world origin in our scene. Volumes place this point at the center of the volume based on initial size. We can move our content down on the y axis.
scene.position.y = -0.4

Now that we have loaded the scene, we can also find specific entities inside it.
if let earth = scene.findEntity(named: "Earth") {
print("Earth entity found")
}Now we know how to
- Load a scene from Reality Composer Pro and add it to our RealityView content.
- Search for an entity in our scene.
Next time we will start adding some interactivity to our scene.
Example Code
struct Example041: View {
var body: some View {
RealityView { content in
// Load a scene from the bundle
if let scene = try? await Entity(named: "RKBasicsLoading", in: realityKitContentBundle) {
// Make sure to add the scene to the content!
content.add(scene)
// Move the entire scene down in the volume
scene.position.y = -0.4
// search the scene for an entity with a name
if let earth = scene.findEntity(named: "Earth") {
print("Earth entity found")
}
}
}
}
}Support our work so we can continue to bring you new examples and articles.

Follow Step Into Vision