TLDR: Timeline does not play animation when Repeat Forever is checked.
Hi! I have created a timeline for my model that does a built-in emphasize animation. Then I added a behavior to my model and has set OnAddedToScene
with action to run that timeline. It works perfect well on my device. But I want the timeline to be looped. I realized that there's no loop option in the timeline, but I noticed that I can loop it if I insert it into another timeline(The loop checkbox shows up). So I did that and had my model's behavior to run that timeline. But then the model doesn't play the animation as intended.
Note: I am not making a VisionPro app, but an iOS app leveraging ARKit and RealityKit
Environment: iPhone 13 Pro Max with iOS18.0
Code:
struct ARViewContainer: UIViewRepresentable {
func makeUIView(context: Context) -> ARView {
let arView = ARView(frame: .zero)
arView.session.run()
Task {
do {
let anchor = AnchorEntity(plane: .horizontal)
let emojiScene = try await Entity(named: "SunglassesScene", in: bubbleAR
anchor.addChild(emojiScene)
arView.scene.addAnchor(anchor)
} catch {
print("Failed to load models: \(error)")
}
}
return arView
}
}
Thank you!