Search Unity

Question Is better to use PNG or SVG for Unity UI?

Discussion in 'UGUI & TextMesh Pro' started by AlexChen9, Jan 23, 2023.

  1. AlexChen9

    AlexChen9

    Joined:
    Nov 7, 2021
    Posts:
    4
    I gonna build a 2D game, since it needs to support both iPhone and iPad, zoom in/out is needed,
    Which format is better to be used?
    PNG or SVG? Does Unity UI support SVG well ?
    I'll apprieate it a lot if you can give me some hints
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
    Last I checked Unity's SVG importer just "strikes" the vector image to a raster image, so there's no real point to using it, as in you will always get pixels.

    The only way I know to get an SVG into Unity is to bring it into Blender, convert it to a curve and export it as an FBX, then you can import it as actual geometry. NOTE: it will still be "struck" at a certain vertex / curve sampling rate, but you can adjust that at convert time.
     
  3. AlexChen9

    AlexChen9

    Joined:
    Nov 7, 2021
    Posts:
    4
    Oh, thank you! but is fbx capable for Unity UI?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,752
  5. AlexChen9

    AlexChen9

    Joined:
    Nov 7, 2021
    Posts:
    4