- Home /
Changing the source image of a UI Image element in the editor - simple, surely?
I've changed my mind about how I want a heads up display image to look, but I cannot for the life of me figure out how to correctly import the new image (I want to retain the old one, in case my idea doesn't work).
I have put the new image in my Assets folder, and it's showing as present in the Unity project panel, but when I try to drag it to the Source Image slot on my UI Image prefab, it won't have it (It makes that black circle-with-a-diagonal-cross symbol). I've also tried clicking the 'cog' to the right of the Source Image slot, but my new image is not featured in those available. I've also tried Assets > Import New Asset, but the imported image gets the same 'black circle symbol' treatment when I try to add it to the Source Image slot.
Sorry to have to ask what SHOULD be obvious, but what am I doing wrong?
EDIT: I should have said all of the images I've imported are PNGs. I'd like to know how to import them in a way that's useful in Unity. It seems like the earlier image has been imported as 'NPOT ARBG 32 bit' ; How do I import new images in that format?
The old image is showing in the inspector as (NPOT) ARGB 32 bit. The new one is RGBA Compressed DXTS. The question then, I guess, is how do I import them as NPOT? They were saved exactly the same way from Photoshop.
Answer by felixfors · Jan 06, 2016 at 07:08 PM
Select your image in the Project window and then change the image type from " Texture" to " Sprite 2d and UI"
Thank you! I must have known that at some stage, but I could NOT figure it out again. But yes, that's done the trick.
Answer by BMayne · Jan 06, 2016 at 06:37 PM
Hey,
The thing you are importing is not a image format that Unity knows. It must be SD, TIFF, JPG, TGA, PNG, GIF, BMP, IFF or PICT.
Cheers,
I should have said, I'm importing a PNG. Do you know how I import it so I can use it? Cheers.
Your answer
![](https://koobas.hobune.stream/wayback/20220612055213im_/https://answers.unity.com/themes/thub/images/avi.jpg)