Emoji moods
Updated
Emojis in UI text: a label and buttons whose text is an emotion emoji. Each button copies its emoji into the big label.
Press a face to show that mood large on the card. Drag outside the card to orbit the camera, scroll to zoom.
Emoji moods
#pragma lifecycle(startup)
function startup() { const mood = findEntity('Mood').getComponent(UILabelComponent); on('mood:pick', (event) => { const emoji = findEntity(event.entityId).getComponent(UIButtonComponent).props.text; mood.setProps({ text: emoji }); log('Mood:', emoji); });}How it works
Section titled “How it works”The script is explained step by step in Emoji moods.
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.
EmojiMoods.xrproj