Attribution
Updated
Credit info: title, author and a link to the source or license.
- Type
comp-attribution- Script class
AttributionComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Frames and links: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
A wall of creditsA 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.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(AttributionComponent); if (component) log(component.props);}