Hi so I have entity that moves with raycasting around the world and it has nested child 3D UI objects that for some reason can’t be clicked on. Here’s the code.
import * as ecs from '@8thwall/ecs' // This is how you access the ecs library.
const clicked = false
ecs.registerComponent({
name: 'SingleWorldButton',
schema: {
startIcon: ecs.eid,
mainbutton: ecs.eid,
// @asset
checked: ecs.string,
// @asset
uncheck: ecs.string,
Word: ecs.eid,
},
// schemaDefaults: {
// },
// data: {
// },
add: (world, component) => {
const {startIcon, mainbutton, Word} = component.schema
world.events.addListener(startIcon, ecs.input.SCREEN_TOUCH_START, () => {
BaseAppear(world, startIcon, mainbutton)
})
},
tick: (world, component) => {
},
// remove: (world, component) => {
// },
// stateMachine: ({world, eid, schemaAttribute, dataAttribute}) => {
// ecs.defineState('default').initial()
// },
})
function BaseAppear(world, startIcon, mainbutton) {
ecs.Hidden.set(world, startIcon)
ecs.Hidden.remove(world, mainbutton)
console.log('this is working')
}
Is there something I’m missing?