Getting Started
To get started with Skia Sharp for Unity, follow these steps:
- Clone or download the Skia Sharp for Unity repository from GitHub. or you can use
Package Manager
- Open your Unity project and navigate to
Windows
> Package Manager
.
- Click the
+
button in the top-left corner and select Add package from git URL
- Enter the following URL and click
Add
https://github.com/ammariqais/SkiaForUnity.git?path=SkiaUnity/Assets/SkiaSharp
- Import the Skia Sharp package into your Unity project.
- In Unity, go to Edit > Project Settings > Player and select the iOS platform.
- Scroll down to the Other Settings section and locate the Scripting Define Symbols field.
- Add
__UNIFIED__
and __IOS__
to the Scripting Define Symbols. This is necessary to enable the SkiaSharp functionality specifically for iOS.
- Create a new script or modify an existing script to leverage the SkiaSharp API for drawing graphics and the Skottie API for playing Lottie animations.
- Build and run your Unity project on an iOS device to see the Skia graphics and Lottie animations in action.