Checkbox initialization when entering in XR problem

Hello,
I I would like to have a checkbox visible only in XR mode, therefore I did the initialization in onStateChangedObservable like in this PG:

The checkbox works (the sphere change the color) but did not check and uncheck (visually) itself. Could you help?

Thank you

It seems like you are running this code twice - when entering and when in XR. any reason to run this twice? when you run it once (for example only when IN_XR) it works as expected

Oh no - no reason. Simple bug! Thank you @RaananW this works.

1 Like