I’m trying to create some simple 3D textboxes using the Studio API’s Ui component, but I’m having some issues creating the styling that I want. Some properties seem to work for Overlays but not 3D, and some don’t work for either. It also seems like the default values listed on the doc page aren’t quite accurate.
Can someone provide some sample code showing how to configure a Ui component to look like what’s shown in my screenshot below? Here’s what I have so far, with comments about what works and what doesn’t.
const textboxEntity = world.createEntity()
ecs.Ui.set(world, textboxEntity, {
background: '#000000',
backgroundOpacity: 0.75, // 0 by default
borderRadius: 10, // setting this to a high value like 9999 makes the background transparent instead of making the corners fully rounded
// type: '3d',
// width: '500px',
padding: '17px', // no effect. Same with the granular padding properties like paddingTop
height: 'auto', // 'auto' makes the background transparent for both 3D and Overlay types
display: 'flex', // no effect
justifyContent: 'center', // no effect
alignItems: 'center', // no effect
text: 'Hello world',
})
