I am using Reality Composer Pro 2.0 and Xcode 16 beta for VisionOS 2 Beta.
I am able to see and trigger RCP Animation Component animations in a RealityView in Xcode by calling playAnimation
on scene.availableAnimations[0]
when a swiftui button is tapped, all good there.
I want to be able to trigger new Timeline Action animations from tapping a swiftui button as well, but I’m not sure the best way to access Timeline Actions to trigger them in code.
I see that I can send a Notification from Xcode that will trigger a timeline action (as shown in screenshot), but I’m not sure how to send a notification from SwiftUI to RCP to trigger this “SpinAndMove” Timeline animation.
If anyone could help send a notification from SwiftUI to RCP or if there’s a better “best practices” method to trigger Timeline Actions from outside of RCP, it would be much appreciated!