Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can't set source image for UI image

Discussion in 'UGUI & TextMesh Pro' started by maatsh, Mar 23, 2015.

  1. maatsh

    maatsh

    Joined:
    Jan 19, 2015
    Posts:
    5
    This is as simple as it gets. :) How do I set a source image for a UI image?

    I cannot drag and drop it from assets to source image. Also when I press the circle next to source image I get a very limited amount of images I can choose from, how do I add my own images here?
     
  2. proandrius

    proandrius

    Unity Technologies

    Joined:
    Dec 4, 2012
    Posts:
    544
    Make sure that your textures are set to "Sprite (2D and UI)" when using for 2D or UI.
     
  3. maatsh

    maatsh

    Joined:
    Jan 19, 2015
    Posts:
    5
    Thanks! That solved it!
     
    ademfcan, UtopianKing and dappledore like this.
  4. leonidvartanian

    leonidvartanian

    Joined:
    Mar 31, 2019
    Posts:
    2
    Thanks So Much
     
  5. enzererkein

    enzererkein

    Joined:
    May 7, 2019
    Posts:
    1
    how?
     
  6. bentoBAUX

    bentoBAUX

    Joined:
    Mar 12, 2017
    Posts:
    2
    In case you have not found a solution already, just click on the image --> at the Texture Type area --> click the drop down menu and select Sprite(2D and UI).
     
  7. unity_F-pIo7hqorKzkg

    unity_F-pIo7hqorKzkg

    Joined:
    Jan 26, 2020
    Posts:
    1
    Can also use Raw Image instead of Image Component
     
  8. hassanmahad3

    hassanmahad3

    Joined:
    Mar 22, 2020
    Posts:
    1
    No you need to use image not raw image because it does not have a option for source image.
     
  9. SangeethDavidKiran29

    SangeethDavidKiran29

    Joined:
    Aug 28, 2020
    Posts:
    1
    Thank u
     
  10. unlucky00gmail

    unlucky00gmail

    Joined:
    Sep 25, 2020
    Posts:
    6
  11. StefanEn

    StefanEn

    Joined:
    Nov 12, 2020
    Posts:
    1
    Thank you so much, sir.
     
  12. samashi_12

    samashi_12

    Joined:
    Dec 12, 2020
    Posts:
    2
    thank you so much it helped me.
     
  13. chaton42

    chaton42

    Joined:
    Feb 2, 2021
    Posts:
    1
    hello, i cant find the texture type area, can you help me?
    thx
     
  14. gabrielldm90

    gabrielldm90

    Joined:
    Mar 16, 2021
    Posts:
    1
    Hello, you have to select your image and change the texture type area.
    Your image have to on directory Assets
     
  15. john_goren

    john_goren

    Joined:
    Mar 19, 2021
    Posts:
    15
    Thanks. In case the answer was unclear to anyone finding this (as it was to me), the setting you're looking on is not on your Image component, but your asset itself, seen through an inspector when you click on it in your assets.
     
  16. UnicronGaming

    UnicronGaming

    Joined:
    Sep 10, 2021
    Posts:
    3
    Thanks
     
  17. pavan09

    pavan09

    Joined:
    Jan 29, 2022
    Posts:
    1
    thanks:)
     
  18. NeoXider

    NeoXider

    Joined:
    Jun 29, 2023
    Posts:
    1
    texture - sprite BUT in Botton in image not inserted. not working
     
  19. askaroe

    askaroe

    Joined:
    Mar 11, 2023
    Posts:
    3
    Thanks!
     
  20. Sifatg

    Sifatg

    Joined:
    Aug 25, 2023
    Posts:
    1
    Thank you very much