UI Clicks work in Preview, but not in Public/Staging (ECS Project)

Hello everyone,

I’m working on a virtual try-on project for cycling glasses using the Face Effects template (the older ECS version, not Niantic Studio). I’ve run into a classic but frustrating issue that I can’t seem to solve.

The Problem:
My UI for switching between 3 glasses models works perfectly in the in-editor Preview mode. However, when I publish the project to Staging or Public, the UI buttons are visible but do not respond to clicks.

Here is a short video of the app running correctly in the published staging environment, showing that the functionality itself is working:
(Insérez ici le lien vers votre vidéo qui montre que ça marche, comme la dernière que vous m’avez montrée. C’est une preuve très forte !)

What I’ve Built:

  • I have a glasses-selector component (originally space-selector.ts) with a stateMachine that listens for ecs.input.UI_CLICK on three UI button entities (option1, option2, option3).

  • When a button is clicked, the stateMachine correctly changes state and uses ecs.Hidden.set/remove to show the corresponding 3D model and UI icon.

  • This logic is flawless in Preview.

What I’ve Already Tried to Debug:
Based on my research and debugging, I’ve already ruled out several common issues:

  1. It’s not a code timing issue: My scripts are based on the same structure as the photo-booth.ts script, which works perfectly in both Preview and Production. The stateMachine starts immediately, which seems to be the correct pattern for this ECS template.

  2. The entity references (EIDs) are correct: Everything is properly linked in the Inspector. If the references were broken, it wouldn’t work in Preview either.

  3. The UI elements are correctly set up: My buttons are UI Element entities, children of a Canvas-like object, not 3D objects in the scene.

The Main Question / The Missing Piece:
My primary suspicion, based on forum posts, is that there must be a specific component or property to make UI elements “clickable” in a published environment. I’ve been told to look for a Raycast Target property.

However, I have inspected my UI button entities (Modele 1, etc.) thoroughly. They have UI Element, Layout, and Background components, but I cannot find a Raycast Target checkbox anywhere.

Here is a screenshot of one of my button’s inspectors:

Could someone please tell me:

  • Where is the Raycast Target property located in this version of the editor?

  • Or, if it’s not called Raycast Target, what is the correct component/property I need to enable to make my UI buttons receive ecs.input.UI_CLICK events in a published build?

Thank you so much for your help! This is the very last issue blocking the launch of my project.