Change image sprite at runtime

I think what you should probably do it set them to webp

image.png

I tried using the canvas ui scale mode ā€œscale with screen sizeā€ but it made the content disappear. Not sure if itā€™s a bug or Iā€™m using it wrong

by user 401167615826984963

Its not implemented yet

ah ok

by user 401167615826984963

What you could do as well is set images on a <img> tag instead too

if you want to go screenspace only :slightly_smiling_face:

Thereā€™s a special type for this: TextureReference

it will copy the images to the output directory instead of including them in the glb

that way your scene should load pretty quickly (because its basically empty) and you can create/update an img src path only

Ah sorry its ImageReference

I donā€™t see the needle tab on my texture settings

by user 401167615826984963

in your typescript code it will end up as a string (the path to th exported file)

You declare it like this:

//@type Needle.Engine.ImageReference
@serializable()
public images : string[];

Nice, I was wondering about that

by user 401167615826984963

Is it this one? Which editor version do you use?
image.png

That one is for ā€œdedicated serverā€

by user 401167615826984963

ah ok :slightly_smiling_face:

2021.3.16f1 personal

by user 401167615826984963

Can you try opening the Build Settings Window and send a screenshot?

it should contain this
image.png