Hey guys
How I can fit RealityView content inside a volumetric window? I have below simple example:
WindowGroup(id: "preview") {
RealityView { content in
if let entity = try? await Entity(named: "name") {
content.add(entity)
entity.setPosition(.zero, relativeTo: entity.parent)
}
}
}
.defaultSize(width: 0.6, height: 0.6, depth: 0.6, in: .meters)
.windowStyle(.volumetric)
I understand that we can resize a Model3D
view automatically using .resizable()
and .scaledToFit()
after the model loaded.
Can we achieve the same result using a RealityView?
Cheers