Anyone else having issues where you can see your 3D models in Xcode preview but when running simulator all you see is the progress view spinner? Below is my Model3D load that I can see in preview but in simulator it only shows the spinner. Any suggestions?
import RealityKit
struct Three_D_Ad: View {
var body: some View {
VStack {
Image("Fender")
Text("Fender Stratocaster")
.font(.title)
Text("Legendary Sound")
Model3D(named: "Fender") { model in
model
.resizable()
.scaledToFit()
.scaleEffect(0.75)
} placeholder: {
ProgressView()
}
}
}
}
#Preview {
Three_D_Ad()
}
Hello @meta_merritt,
I have a feeling that you don't have a "Fender" resource in your main bundle. If Model3D cannot find the resource, it won't progress beyond the provided placeholder view. Try specifying the bundle that the resource resides in, for example:
Model3D(named: "Fender", bundle: realityKitContentBundle)