How to get rid of white box when a texture isn't assigned to a image element

I want to make it so if a element does not have a texture it wont display the white box. How would I do either of those?

What do you want to show instead?

just nothing, I want nothing to be there instead of the white box

I think you need to disable the entity, component or change the opacity.

well then do you know of a way to check to see if the element has a texture assigned?

No, not really.

Something like below I guess.

if (this.entity.element.texture) {
    // element has texture 
if (this.entity.element.texture.resource) {
    // element has texture 

I’ll check this later, thanks

The first one works fine. Imma add this to the things I’ll never use untill I do

1 Like