ammariqais / skiaforunity Goto Github PK
View Code? Open in Web Editor NEWSkia For Unity with lottie animations, harfbuzz, svg supports
Home Page: https://ammariqais.github.io/SkiaForUnity/html/
License: MIT License
Skia For Unity with lottie animations, harfbuzz, svg supports
Home Page: https://ammariqais.github.io/SkiaForUnity/html/
License: MIT License
Will it be any support for WebGL ?
Hello!
After a successful iOS build, my application works great with all Skia features on real devices. However, when I try to push it to App Store Connect, I face errors:
Asset validation failed
Unsupported Architectures. The executable for 3D.app/Frameworks/libHarfBuzzSharp.framework contains unsupported architectures '[x86_64, i386]'.
Asset validation failed
Unsupported Architectures. The executable for 3D.app/Frameworks/libSkiaSharp.framework contains unsupported architectures '[x86_64].
Any ideas how to solve it?
Thanks!
Lottie file with pictures cannot be displayed.
Hello ๐
I was trying to use SkiaForUnity
with SkottiePlayerV2
It works fine on editor, but when I build it targeting mac desktop I get the following error:
Exception: DllNotFoundException: libSkiaSharp assembly:<unknown assembly> type:<unknown type> member:(null)
SkiaSharp.SKData..cctor () (at ./Library/PackageCache/com.ammariqais.skiaforunity@18b9511a3e/SkiaSharp-Bindings/SKData.cs:22)
Rethrow as TypeInitializationException: The type initializer for 'SkiaSharp.SKData' threw an exception.
SkiaSharp.Unity.SkottiePlayerV2.LoadAnimation (System.String json) (at ./Library/PackageCache/com.ammariqais.skiaforunity@18b9511a3e/Runtime/SkottiePlayerV2.cs:119)
SkiaSharp.Unity.SkottiePlayerV2.Start () (at ./Library/PackageCache/com.ammariqais.skiaforunity@18b9511a3e/Runtime/SkottiePlayerV2.cs:68)
How can I fix it?
During development we have constant crashes with the below stack trace. I'm not sure what conditions are needed exactly but at least the case if one forget to stop play mode before triggering a recompile is always triggering the crash. The component in question is the SkottiePlayer
. Unity 2022.3.10 (Windows Standalone), Skia package version 2.1.3. A fix for this would be much appreciated!
=================================================================
Native Crash Reporting
=================================================================
Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at NonAlertableWin32Lock:EnterCriticalSection <0x000db>
at NonAlertableWin32Lock:Enter <0x0008a>
at NonAlertableWin32Lock:EnterWriteLock <0x00082>
at SkiaSharp.HandleDictionary:DeregisterHandle <0x00236>
at SkiaSharp.SKObject:DeregisterHandle <0x0010a>
at SkiaSharp.SKObject:set_Handle <0x00132>
at SkiaSharp.SKNativeObject:Dispose <0x0030b>
at SkiaSharp.SKObject:Dispose <0x0007a>
at SkiaSharp.SKCanvas:Dispose <0x0007a>
at SkiaSharp.SKNativeObject:Finalize <0x000c0>
at System.Object:runtime_invoke_virtual_void__this__ <0x0018b>
=================================================================
When I build my game for iOS, I get this error on my device.
This is link of my Unity project:
https://github.com/e-fo/UnityRuntimeAtlasMultithreaded
Can anyone helps me to find and solve my problem?
DllNotFoundException: Unable to load DLL 'libSkiaSharp'. Tried the load the following dynamic libraries: Unable to load dynamic library '/libSkiaSharp' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(/libSkiaSharp, 0x0005): tried: '/libSkiaSharp' (errno=2), '/private/preboot/Cryptexes/OS/libSkiaSharp' (errno=2), '/libSkiaSharp' (errno=2)\
at SkiaSharp.SkiaApi.sk_version_get_milestone () [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SkiaSharpVersion.get_Native () [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible (System.Boolean throwIfIncompatible) [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKObject..cctor () [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKObject.set_Handle (System.IntPtr value) [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKNativeObject.Finalize () [0x00000] in <00000000000000000000000000000000>:0 \
Rethrow as TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.\
at SkiaSharp.SKObject.set_Handle (System.IntPtr value) [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKNativeObject.Finalize () [0x00000] in <00000000000000000000000000000000>:0 \
UnityEngine.UnhandledExceptionHandler:PrintException(String, Exception)\
UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)\
\
DllNotFoundException: Unable to load DLL 'libSkiaSharp'. Tried the load the following dynamic libraries: Unable to load dynamic library '/libSkiaSharp' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(/libSkiaSharp, 0x0005): tried: '/libSkiaSharp' (errno=2), '/private/preboot/Cryptexes/OS/libSkiaSharp' (errno=2), '/libSkiaSharp' (errno=2)\
at SkiaSharp.SkiaApi.sk_version_get_milestone () [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SkiaSharpVersion.get_Native () [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible (System.Boolean throwIfIncompatible) [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKObject..cctor () [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKObject.set_Handle (System.IntPtr value) [0x00000] in <00000000000000000000000000000000>:0 \
at SkiaSharp.SKNativeObject.Finalize () [0x00000] in <00000000000000000000000000000000>:0 \
UnityEngine.UnhandledExceptionHandler:PrintException(String, Exception)\
UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)\
Android, iOS and the Editor seem to work. Windows compile bombs out with the following:
## Script Compilation Error for: Csc Library/Bee/artifacts/1900b0aP.dag/SkiaSharp.Unity.dll (+2 others)
## CmdLine: "C:\Program Files\Unity\Hub\Editor\2022.3.1f1\Editor\Data\NetCoreRuntime\dotnet.exe" exec "C:/Program Files/Unity/Hub/Editor/2022.3.1f1/Editor/Data/DotNetSdkRoslyn/csc.dll" /nostdlib /noconfig /shared "@Library/Bee/artifacts/1900b0aP.dag/SkiaSharp.Unity.rsp" "@Library/Bee/artifacts/1900b0aP.dag/SkiaSharp.Unity.rsp2"
## Output:
SkiaSharp\Runtime\SkottiePlayer.cs(6,29): error CS0234: The type or namespace name 'Skottie' does not exist in the namespace 'SkiaSharp' (are you missing an assembly reference?)
SkiaSharp\Runtime\SkottiePlayer.cs(26,11): error CS0246: The type or namespace name 'SKCanvas' could not be found (are you missing a using directive or an assembly reference?)
SkiaSharp\Runtime\SkottiePlayer.cs(27,11): error CS0246: The type or namespace name 'SKRect' could not be found (are you missing a using directive or an assembly reference?)
SkiaSharp\Runtime\SkottiePlayer.cs(29,11): error CS0246: The type or namespace name 'SKImageInfo' could not be found (are you missing a using directive or an assembly reference?)
SkiaSharp\Runtime\SkottiePlayer.cs(30,11): error CS0246: The type or namespace name 'SKSurface' could not be found (are you missing a using directive or an assembly reference?)
I tried simply removing that file and it caused other errors.. so presumably it's needed.
This error pops up right after installing the package into an empty project and wont go away.
"Library/PackageCache/com.ammariqais.skiaforunity@29f8cfa/SkiaSharp-Bindings/SKMatrix44.cs(474,4): error CS0122: 'Unsafe' is inaccessible due to its protection level"
Unity Version 2022-3-10f1.
Faced into problem with unsafe namespace
Fixed it with "Unsafe.dll" added in project folder (from here)
Hope, you will fix installation via UPM
Thank!
The issue can be recreated when the project is imported into some different Unity Version whether it be newer or older. So, the user is forced to work in the same Unity version as provided in SkiaForUnity.
I am currently creating a package which includes a set of scenes for other projects to use. Those scenes have lottie animations. Due to Unity's limitation that packages can't have git dependencies (source: https://docs.unity3d.com/Manual/upm-git.html), I really need this in an importable format for that if possible
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.