0
\$\begingroup\$

I cannot import an .svg into a Unity project.

When I just move the .svg file into the Unity project Unity does not work with it and the only option Unity provides is to open the file (in my case it proposes me to open the .svg with Inkscape).

enter image description here

After performing a little bit of research I come to a conclusion that I need to have an SVG Package being installed into the Unity in order to import the .svg files.

But when I try to install the package I do not find it in the list of packages.

enter image description here

I am using a free Personal Edition of Unity. So, may it be that the option to import .svg is for paid version of Unity only?

Thank you.

Yes, it really seems that importing an .svg into Unity is only a paid feature. So, does anyone know about a way to import an .svg into Unity for free? For instance, are there other packages which help to accomplish this?

I do not see the needed package in the list of packages for preview: enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ That wouldn't be a paid-only option. Try downloading the package and opening it. I don't have it with me at the moment, so I can't give details on how. \$\endgroup\$
    – Almo
    Commented Jan 23, 2019 at 21:31
  • \$\begingroup\$ @Almo, but one should pay in order to download the package... \$\endgroup\$ Commented Jan 23, 2019 at 21:31
  • \$\begingroup\$ SVG is not a format that Unity understands natively. That means you can either use a library/package that adds this functionality (paying the authors for the use of it, if they've offered it as a paid asset), implement the functionality yourself, or convert the SVG to a format Unity does understand. We do not give tech recommendations here, so it's up to you to search for available libraries/packages and evaluate which ones meet your needs. But we can help you solve problems in implementing the functionality yourself or converting an SVG to another format, if you edit your question to ask this \$\endgroup\$
    – DMGregory
    Commented Jan 23, 2019 at 23:49
  • \$\begingroup\$ @DMGregory, is not this package free? And is not it is supposed to be incorporated into every Unity Editor of the version 2018.1 and later? \$\endgroup\$ Commented Jan 24, 2019 at 14:58
  • \$\begingroup\$ Looks that way. Check out existing Q&A about how to install that package. \$\endgroup\$
    – DMGregory
    Commented Jan 24, 2019 at 15:28

2 Answers 2

2
\$\begingroup\$

If you want to use the Unity Vector Graphics preview package, make sure you check "Show preview packages" under Window > Package Manager > Advanced

With this, you should see the Vector Graphics package appears and can be installed.

Screenshot of enabling "Show preview packages" to show the Vector Graphics package

\$\endgroup\$
3
  • \$\begingroup\$ Can you confirm what version of Unity you're running? You may need to allow some time with an internet connection and a valid Unity account login for the new preview packages to be found and populated into the list. When in doubt, close & restart Unity, and contact tech support if the software still isn't working as documented. \$\endgroup\$
    – DMGregory
    Commented Feb 3, 2019 at 21:16
  • \$\begingroup\$ The Unity editor version which I am using is 2018.3.0f2. Which method would you advise for contacting the support? Thank you. \$\endgroup\$ Commented Feb 4, 2019 at 0:43
  • \$\begingroup\$ Inside Unity, open the Help menu and select "Troubleshoot Issue..." — from there you can search for help on the issue and report a new issue to their support teams if it's not already covered. \$\endgroup\$
    – DMGregory
    Commented Feb 4, 2019 at 0:47
2
\$\begingroup\$

I would recommend to open the SVG image with an SVG editor (like the free Inkscape) and export it as a PNG (or other raster-oriented image format).

The drawback of this method is that you will lose the ability to scale the image infinitely without it becomming pixelated or blurry. But the advantage is that it will be a lot faster than solutions which rasterize the SVG in real-time. SVG is a very complex vector image format where many features have very hard to predict performance characteristics. So if you intend to use a lot of complex SVG images, then a runtime rasterizing solution might cause performance problems.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .