Hello, Yesterday I updated xCode 15.2 Beta to 15.5. Now i tried to run my App but after starting i I recognized that when I open my volumetric window that the USDA scene in my RealityView doesn't file doesn't appear anymore. RealityView will be executed.+
When I use a 3D Model in my volumetric window the USDA appears without any problems. Here is my code:
//
//
//
// Created by Patrick Schnitzer on 30.07.23.
//
import SwiftUI
import RealityKit
import RealityKitContent
struct MyWindow: View {
var body: some View {
RealityView { content in
async let object = ModelEntity(named: "testScene", in: realityKitContentBundle)
print("I exec")
guard let object1 = try? await cloudyWeather else {return }
object1.generateCollisionShapes(recursive: false)
object1.components.set(InputTargetComponent())
object1.location = .init(0,0.5,0)
object1.scale *= 1
content.add(object1)
}.gesture(dragGesture)
}
var dragGesture: some Gesture {
DragGesture()
.targetedToAnyEntity()
.onChanged { value in
print(value.entity.name)
value.entity.position = value.convert(value.location3D, from: .local, to: value.entity.parent!)
}
}
}
#Preview {
MyWindow()
}