An unlit marker that ignores the lights
Updated
The lights dim and come back every few seconds: the Standard sphere darkens with them, while the Basic material sphere keeps its full colour, because a Basic material is never lit.
Watch the left sphere darken with the lights while the Basic sphere on the right stays bright. Drag to orbit the camera, scroll to zoom.
An unlit marker that ignores the lights
#pragma lifecycle(startup)
// Dim the lights to a tenth and back; only lit materials follow.const LIGHTS = [ ['Sun', DirectionalLightComponent], ['Fill', AmbientLightComponent], ['Key Light', SpotLightComponent],];
function wait(ms) { return new Promise((done) => delay(done, ms));}
async function startup() { const lights = LIGHTS.map(([name, kind]) => findEntity(name).getComponent(kind)); const full = lights.map((light) => light.props.intensity); const unlit = findEntity('Unlit Sphere').getComponent(BasicMaterialComponent); log('Basic material colour:', unlit.props.color);
for (;;) { await wait(1500); log('Lights down'); await Tween.value(1, 0.1, (k) => lights.forEach((light, i) => light.setProps({ intensity: full[i] * k })), { duration: 1.2, ease: Ease.InOutSine }); await wait(1500); log('Lights up'); await Tween.value(0.1, 1, (k) => lights.forEach((light, i) => light.setProps({ intensity: full[i] * k })), { duration: 1.2, ease: Ease.InOutSine }); }}Open it in XR Creator
Section titled “Open it in XR Creator”Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.
UnlitBasicMaterial.xrproj