has anyone gotten their 3d Models to render in seperate windows, i tried following the code in the video for creating a seperate window group, but i get a ton of obsecure errors, i was able to get it to render in my 2d windows, but when i try making a seperate window group i get errors
for anyone that runs into the same issue, i figured it out, the model3D needs to be in its own view, and you put that inside the windowgroup, instead of the model3D.
e.g:
import SwiftUI
@main
struct _5puzzleApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
WindowGroup(id: "planet-earth") {
EarthView()
}
.windowStyle(.volumetric)
.defaultSize(width: 0.8, height: 0.8, depth: 0.8, in: .meters)
}
}
struct EarthView: View {
var body: some View {
Model3D(named: "Earth")
}
}