[SOLVED] Texture change of image element

I changed the texture of the image element through the code.

console.log(this.entity.element._image._texture);
this.entity.element._image._texture = this.assetsImage.resource;
console.log(this.entity.element._image._texture);

The console.log() confirmed that the value has changed.
image
But it didn’t change in Scene.

How can we solve this problem?

Thank you!

Hi @issactoast!

This line doesn’t look correct to me. Please try to use the line below.

this.entity.element.texture = this.assetsImage.resource;
2 Likes

@Albertos
Thanks to you,
I was able to solve the problem well.

Thank you for always helping me.

1 Like