Change UI width and height programmatically

I’m trying to create a popup window to show image that match with the image of the object that user interact with. TPS Template test - PLAYCANVAS

i’ve tried set

    var textureAsset = this.app.assets.find(this.entity.render.material._diffuseMap.name);
    this.artwork.element.width = textureAsset._resources[0].width;
    this.artwork.element.height = textureAsset._resources[0].height;

but if i set width and height, the UI didn’t appear although the width, height is set and the entity is enabled but still didn’t appear. can anyone help?

Works fine here: https://playcanvas.com/editor/scene/1340948

Can you share an example Editor project that repros your issue please?

omg, nvm i put the code when the keyboard is pressed, but if i put the code inside on trigger enter function, it is changing now :sweat_smile: thanks