mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.41k stars 535 forks source link

[QUESTION] SkiaSharp Unity error #2177

Closed craftercis closed 2 years ago

craftercis commented 2 years ago

Hello.

I'm using a tool called 'NuGetForUnity'. This tool makes it easier to install NuGet packages within Unity. With this tool, I am trying to install 'QuestPDF'. QuestPDF needs SkiaSharp. NuGetForUnity also downloads this neatly, but now I get tis error:

image

These are all the packages that are installed when I installed QuestPDF:

image

Is there a way to solve this?

craftercis commented 2 years ago

Disclaimer:

This answer solved my problem with QuestPDF. Maby it's different for SkiaSharp only.

I solved the error. If you want SkiaSharp to work with Unity you need to do the following:

  1. Download NuGetForUnity and install it in your project.
  2. Install SkiaSharp from the list.
  3. Remove these 2 folders inside the SkiaSharp package folder
  1. Then you need to install libskiasharp and libharfbuzzsharp from NuGet these are the versions where I could find the lib dll

Hope this helps!