I have a web build I have AR and VR disabled on unless the url parameters have a string that turns them on at runtime. I noticed the iOS quick look button won’t ever show unless AR is enabled in the build initially.
In the scenario of having AR enabled in the build, the Quick look button always shows but I want this to be optional so that I can disable AR/Quick look via url params.
Is it possible to make Quick Look separate to the AR WebXR setting?
Code snippet of what I am doing in start, if Enable AR and VR are ticked on the WebXR component but the Create AR/VR buttons are disabled, this doesn’t work. This only works if Enable AR and VR are unticked in the build for some reason.
it’s like if Enable AR/VR is true already, , .createARButton and .createVRButton don’t work
It’s a model viewer to preview models online - sometimes it will be sent out and I don’t want a client to see it in AR/VR so I made it an optional parameter in the url
So currently that logic above works great if Enable AR/VR are off in the build by default, I can then enable AR/VR by url params but now I found the Quick look button only shows ever if Enable AR is already on
That’s a cool idea, might have to try it out. For now the setup I have is great but just some means of programmatically hide/showing the quick look button at runtime would be cool. For example if there was a larger experience where I didn’t want to show the quick look button until later on ie. After a cutscene or user interacting with something to unlock quick look
One thing I’ve seen used for this is rendering custom AR/VR buttons and invoking the functionality from code instead of using the built-in ones - this way you also have full control over when they are shown. AR/VR would be on from the start, since that also does all the support checks and so on.
You can take a look at the custom XR buttons sample
I tried ## [3.6.15] - 2023-06-22 which has Fix: USDZExporter Quicklook button not being removed when exporter gets removed or disabled but if the AR is disabled then re-enabled programmatically, the quick look button doesn’t show. Is there a way in that to programmatically show it once AR is enabled at runtime?
For example in this instance the USDZExporter.js script has an onEnable method I can’t access in code through a .ts script - I am hoping to just enable and disable it when needed to trigger this.addQuicklookButton();
What does “when the ar is disabled” mean? The change was referring to the usdzexporter component becoming disabled (either by the gameobject being removed or setting enabled to false)
If the WebXR Script has the Enable AR and Create AR button disabled, then I programmatically enable those after in code I’m hoping to then trigger the onEnable() function of the USDZExporter script - will try messing with what gameobject it is on like putting it on a child of the scene called Content