"Although Xcode generates loading methods for all Reality Composer files in your Xcode project"
I do not find this to be true, sadly.
Does anyone have any luck or insight on how one can build just a simple MacOS app that will import a scene from a Reality File?
The documentation suggests that the simple act of bringing a .Reality File in (What about .realitycomposerpro?) will generate code, but that doesn't seem to happen.
The sample code (Spaceship) does not compile for MacOS.
I'd really love just the most generic template of an Xcode Project that compiles with a button that pops open a scene., Like the VisionOS default immersive project.
Hey @theonlyone,
Adding Reality Composer Pro content to macOS can be done the same way that you add it on visionOS, add the Reality Composer Pro package to your project and then you can open the scene similar to how you do it on visionOS.
BOT-anist is a great example of a cross platform application that uses Reality Composer Pro content on macOS.
Here's a minimalistic sample:
import SwiftUI
import RealityKit
import RealityKitContent
@main
struct RealityKitOnMacOSApp: App {
var body: some SwiftUI.Scene {
WindowGroup {
RealityView { content in
// Add the initial RealityKit content
if let immersiveContentEntity = try? await Entity(named: "Immersive", in: realityKitContentBundle) {
content.add(immersiveContentEntity)
}
}
}
}
}
Let me know if this helps,
Michael