A wall of credits
Updated
A small gallery whose pieces carry Attribution components: at start the script reads each title and author and writes them on a credits sign, with “Unknown artist” where no author is set.
Read the credits sign on the right: it was written from the pieces' Attributions. Drag to orbit the camera, scroll to zoom.
A wall of credits
#pragma lifecycle(startup)
function startup() { const gallery = findEntity('Gallery'); const lines = [];
for (const child of gallery.children) { if (!isEntity(child)) continue; const credit = child.getComponent(AttributionComponent); if (!credit || !credit.props.title) continue; const author = credit.props.author || 'Unknown artist'; lines.push(`${credit.props.title} by ${author}`); }
const credits = findEntity('Credits').getComponent(TextComponent); credits.setProps({ text: lines.length ? lines.join('\n') : 'No credits yet', fontSize: 0.08, maxWidth: 2, textAlign: 'left', anchorX: 'left', anchorY: 'top', });}How it works
Section titled “How it works”The script is explained step by step in A wall of credits.
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.
CreditsWall.xrproj