unity.webp
What's this?
This project was based in octo-code/webp-unity3d.
I decided that there should be a simpler way and I created unity.webp, a plugin that helps you to use webp in your Unity3d projects in a clear and easy way and works in iOS, Android, Windows, Linux projects.
prebuilt library
- prebuilt library are maintained by prebuilt-libwebp
- libwebp version v1.2.2
installation
choose your preference
using UPM
using #{version}
for versioning.
ex)
{
"dependencies": {
"com.netpyoung.webp": "https://github.com/netpyoung/unity.webp.git?path=unity_project/Assets/unity.webp#0.3.9",
"org.nuget.system.runtime.compilerservices.unsafe": "6.0.0"
},
"scopedRegistries": [
{
"name": "Unity NuGet",
"url": "https://unitynuget-registry.azurewebsites.net",
"scopes": [
"org.nuget"
]
}
]
}
Example
- check Samples/ directory
Demo
WebGL
- WebGL's System.Threading.Tasks async based logic is not stable. If you want to use async based logic for WebGL build, try to use Cysharp/UniTask.
- For WebGL build, this repo copied webmproject/libwebp directly. It will be more cleanable if it can be support prebuilt. But It needs more investigate.
stop to support .unitypackage
- This library depends on System.Runtime.CompilerServices.Unsafe. But with
package manager
and.unitypackage
it is hard to maintain both. so I deprecated to support .unitypackage.
LICENCE
webp
Ref
- octo-code/webp-unity3d - License: Apache License