Forum Discussion
2 Replies
- SeeingBlueMentor
The Pressables have some events we can use to do something like this.
onClick()
onEnter()
onExit()
onPress()
onRelease()Here is an article that discusses this. You could also take a look at the code from Station04-GenericYesNoDialog in the CustomUI tutorial world to get an idea of how they work.
https://developers.meta.com/horizon-worlds/learn/documentation/tutorial-worlds/custom-ui-examples-tutorial/station-4-generic-yes-no-dialog - SassyNoodlePartner
Create a prop of PropType.Entity within your UI component, then place the text gizmo into that prop. Within the UI component, you can cast the entity as a text gizmo using .as(TextGizmo), and then use .text.set() to pass in the new text string.