- Home /
I can't see any png files as a source image
I added a png file that has an image and a transparent layer (so basically a border) to the Assets folder but I can't use it as a source image; the only thing I can do is add it to a material and apply the material to an object, the only problem is I am trying to texturize an UI Image object.
Unfortunately, I can't see the source texture and only applying the material without a source image doesn't render anything :(
Can anyone give me some pointers on how to treat this aspect ? I'd use a jpg file but I doubt the transparency will hold out as well.
For short, what I want is a camera canvas that has 2 images applied: a background and a border (with a transparent center). The hierarchy looks like this:
- Canvas
- Panel
- BG image (this is a JPG and I can set it as a source image)
Border image (this is a PNG - only found as a material)
- BG image (this is a JPG and I can set it as a source image)
- Panel
I can't seem to get it working :(
Is the PNG set as a sprite(2D and UI) Texture in its import settings?
Answer by Ali_Jaffer · Sep 14, 2014 at 08:30 PM
Select that image from project window >> go into inspector window and choose texture type from drop down menu i-e Sprite(2D or UI) apply those settings
Answer by Kirbyrawr · Aug 24, 2014 at 03:08 AM
Without any more information we can't do a lot but i will leave my set up here, maybe it helps you
On the left inspector you have the Panel - Left Menu and on the right inspector you have the Image - Border
Duh! I figured out that I forgot set the image as "Sprite( 2D / uGUI)" on import panel. XD
Answer by Shaq · Jun 12, 2017 at 12:14 PM
I had the same issue, I restarted Unity 5.6 and started to work
Answer by mitchmeyer1 · Dec 20, 2018 at 04:08 PM
For anyone having this issue and their texture was set to Sprite 2D, I had to select another, then re-select Sprite 2D and save. Not sure what happened but that worked for me!
Your answer
![](https://koobas.hobune.stream/wayback/20220613161344im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
image will not snap to canvas 0 Answers
Create, export, and then load a huge image. 2 Answers
weird color or lighting bug in Unity? 1 Answer
Set scale value of a sprite to match with size (with, height) of an image? 2 Answers
UI fade with CanvasGroup vs of Image.color.alpha or Text.color.alpha performance 1 Answer