About AR compatibility

In QuickLook you donā€™t get these kind of lifecycle events unfortunately - you only get what Appleā€™s preliminary behaviours provide, which weā€™re matching and extending in our Everywhere Actions

May I ask what your goal is?

Sure.
The component Web XR Image Tracking has a list of Tracked Images , each of these has a Image and a Object which will be activate when the image is detected.
I want to log or store the Image path when that image is detected. Thats the first goal.

by user 632418299711324161

My first test was using what you said me about the onEnable and onDisable
`onEnable(): void {

    (this.imageTracking.trackedImages).forEach((_img)=>{
        console.log(_img);
        if(_img.object!.asset === this.gameObject){
            console.log("Detect the object");
            console.log("Image :", _img.image);
            console.log("Object :", _img.object!.asset);
            
            for (let i = 0; i < this._modelRenderer.sharedMaterials.length; i++) {
                this._modelRenderer.sharedMaterials[i]["color"].setRGB(Math.random(), Math.random(), Math.random());
            }
            
        }
    })
    
}`

by user 632418299711324161

Thats just a test which changes the color of the model when is reconized.

by user 632418299711324161

In iOS AR / QuickLook you donā€™t get any storage or script execution, itā€™s really a pretty limited sandbox (limited by Apple). Itā€™s ā€œmodel display and simple behaviours like click-to-animateā€

Typically youā€™d have people configure something while still in the browser (e.g. in a product configurator, choose a specific product and settings) and then they enter AR to view it.
Configurability in AR can make sense but often complicates things for users

This page contains a number of samples for how far you can drive interactivity on QuickLook: Augmented Reality Showcase

Okey, really, thank you : )
And in the case using Web XR ?

by user 632418299711324161

Unlimited Power! :blush:
When youā€™re in WebXR youā€™re still on the same page, not in a sandbox, so can be fully programmed

One question,
If I check the Image Does Not Move, Are the onEnable/onDisable callbacks still called each time the object is detected?
image.png

by user 632418299711324161

Yes they are. They are called whenever an object becomes active