Feature Request: Required EID Validation for Custom Components

Hi Niantic Studio team,

I’d like to suggest a feature that could help prevent a common issue when working with ECS components.

When registering a custom component like so:

ecs.registerComponent({
  name: 'screenshot-capture',
  schema: {
    overlayFrame: ecs.eid,     // Root overlay container
    topFrame: ecs.eid,         // Container for close button
    middleFrame: ecs.eid,      // Container for preview image
    bottomFrame: ecs.eid,      // Container for capture button
    button: ecs.eid,           // Entity ID of the UI button to trigger screenshot
    previewImage: ecs.eid,     // Entity ID of the img element for showing preview
  },
});

If any of the ecs.eid fields are left unassigned (due to oversight or a stale reference), the component doesn’t throw an error by default. This can lead to confusing bugs that are not actual logic errors, just missing or incorrect entity references.

It would be a great help if the system could automatically throw an error or warning when a required ecs.eid is left undefined or null at initialization. This would enforce better data hygiene and save time debugging issues that stem purely from unlinked entities.

I realize this could also be handled manually in user code with validation checks, but having this built into the framework as an optional default behavior (e.g., requireEIDs: true) would be ideal.

Thanks for considering this — it would definitely make development smoother and more robust!

Best,

Awesome suggestion, I’ll make sure this is on the team’s radar.

1 Like