I am currently using the Everywhere Actions for PlayAnimationOnClick Triggers from Unity. These work with iOS 18 but not with iOS 17 versions. Is this an issue that others find as well. Is there a work around for it?
Hello Vijay NV,
The issues you are experiencing with “Everywhere Actions for PlayAnimationOnClick” on iOS 17 may stem from compatibility challenges specific to that version. Several developers have reported similar concerns regarding functionality differences between iOS 17 and iOS 18, particularly with animation triggers.
As a potential workaround, ensure that you include the USDZExporter
component in your scene, as it is essential for iOS compatibility. Also, consider setting up the action to initialize on a “Start” trigger rather than relying solely on click events, which might improve reliability across different iOS versions (see everywhere actions) (see everywhere actions).
For more tailored advice, it would be helpful to know more about your project setup and potentially any error logs or specific behaviors you’re witnessing. This could clarify if the issue is code-specific or related to the iOS environment itself.
If you have further questions or need more specific guidance, feel free to ask!
3 replies left
thread_hujB9V37IolgtDRnnysCZMLK
Reply to this message to continue the conversation
I have been using the Everywhere action ‘PlayAnimationOnClick’ and also got a USDZExporter within the scene. But still the animations seem to work in iOS 18, but not in iOS17.
Hello Vijay NV,
Given that you’re still experiencing issues with the “PlayAnimationOnClick” action on iOS 17 despite including the USDZExporter, it could be related to how animations are managed within the iOS QuickLook environment.
According to the documentation, there are known limitations and bugs that can affect animation playback in QuickLook on older iOS versions. Particularly, actions may not stop previous animations when they trigger again, leading to overlapping animations (see the documentation) (see the documentation).
To work around this, you can ensure that your animations are set for exclusive playback. This approach will prevent overlaps by disabling other animations when one is triggered. Below is a brief suggestion for adjusting the behavior to accommodate this:
-
Verify Animation Settings: Ensure that your animation clips are configured properly in the Animator, and that transitions are set correctly without any unexpected looping states.
-
Use Exclusive Playback: Modify the setup for “PlayAnimationOnClick” to invoke exclusive playback when multiple animations are involved. This should help mitigate issues with animation overlaps.
Here’s a potential code structure you might want to consider implementing:
afterCreateDocument(ext: BehaviorExtension, context: USDZExporterContext) {
const animationExt = context.extensions.find(ext => ext instanceof AnimationExtension) as AnimationExtension;
const requiresExclusivePlayback = animationExt.getClipCount(this.target) > 1;
if (requiresExclusivePlayback) {
PlayAnimationOnClick.rootsWithExclusivePlayback.add(this.target);
// Ensure exclusive playback
ext.addBehavior(playAnimationOnTap);
}
// Other configuration...
}
Exploring these adjustments in gameplay logic and configuration should provide better compatibility with iOS 17. If problems persist, consulting the latest updates or issues posted by the Needle Engine community may also be beneficial.
If you need further assistance or specific code implementation, just let me know!
2 replies left
thread_hujB9V37IolgtDRnnysCZMLK
Reply to this message to continue the conversation
Hey there, could you please submit a bug report to us with the file in question?
Everywhere Actions are supposed to work (and tested to work) in both iOS 17 and iOS 18, so you might be hitting some specific bug.
Hello @Vijay_NV , thanks for sending a bug report.
I looked at it and have a couple additional questions.
When you say “the animations seem to not work on iOS17”, what do you see? Does the file load, and then the animations don’t work, or do you get a QuickLook crash?
I’m still trying to understand why iOS17 works differently for your file; my assumption so far is that the limits on the number of concurrent behaviors in a file have changed between iOS17 and iOS18 and your file goes beyond those limits.
Independent of that, I recommend simplifying some of the geometry in your file; it seems to be mostly unoptimized CAD data and currently results in a 130MB USDZ file, which is beyond the limit of some weaker/older iOS devices.
Hello Felix, thanks for looking into it. I really appreciate the effort.
The USDZ file loads in every iOS device with iOS 18 from iphone 12. We tried the webpage in quicklook on the same phone with iOS 17 when the quicklook loads up, but play animation on click does not trigger the animation. (On click, the object starts to flicker - around every second and doesn’t play the animation). The same webpage started playing the anims after upgrading to iOS 18.
The experience seems to work in iPhone 13 with iOS 18 but not iPhone 14 with iOS 17. So I am not sure if it is the optimisation issue.
Has it got anything to do with the Loop time and Loop pose in Unity by any chance? I have got loop time and loop pose enabled for the initial idle animation. I have tried leaving the default state as an empty state as well.
I’m also still trying to understand the difference – I’m not aware of animation playback changes between iOS 17 and iOS 18, so I think the file might be hitting some kind of limit that might have changed on Apple’s side.
Can you confirm that our reference examples for USDZ animation indeed work fine on your iOS 17 device? (it does for me)
You can test with this page: Animator (Everywhere Actions) | Needle Engine
or right from here:
Hello Felix,
This worked in iOS 17. But hangs in iOS 18.1 on quicklook.
When opening quicklook, The small transparent model is visible, but after scanning, when trying to place the object, the app hangs.