simonoliver / UnityFigmaBridge

Easily bring your Figma Documents, Components, Assets and Prototypes to Unity
MIT License
367 stars 37 forks source link

SVG Importer [FEATURE REQUEST] #22

Open riccardokhm opened 1 year ago

riccardokhm commented 1 year ago

Dear creators, have you thought of including a svg importer?

simonoliver commented 1 year ago

Hey Riccardo, Yep its definitely on the list to look integrating with the Unity Vector Graphics API to support SVG images rather than server-side rendering for Vectors- https://docs.unity3d.com/Packages/com.unity.vectorgraphics@2.0/manual/index.html

I think it probably would only be suitable for larger images though - for small images (icons/logos) there might be issues with small details and antialiasing.

riccardokhm commented 1 year ago

Yep, I agreed. Tell me if you need some help! It could be interesting to develop such functionality! As for server-side rendering what do you mean exactly?

simonoliver commented 1 year ago

Yeah by all means if you have the time and want to look into it, any help is very welcome. I'm not super familiar with the vector graphics library (and compatibility with Unity UI). For server side rendering, at the moment some node types which aren't natively supported by the library (such as VECTOR and BOOLEAN_OPERATION) are rendered via the Figma API as images. You can see the way nodes are identified here - https://github.com/simonoliver/UnityFigmaBridge/blob/main/UnityFigmaBridge/Editor/FigmaApi/FigmaDataUtils.cs#L295