unity.webp
unity.webp copied to clipboard
:art: WebP made easy for Unity3d
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 OpenUPM
As a shared dependency, this uses the openUPM package com.system-community.systemruntimecompilerservicesunsafe
, you will need to add it to OpenUPM's scopes, and it will be pulled in by this package.
{
"dependencies": {
"com.netpyoung.webp": "0.3.8"
},
"scopedRegistries": [
{
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": [
"com.netpyoung.webp",
"com.system-community.systemruntimecompilerservicesunsafe"
]
}
]
}
using UPM
using #{version}
for versioning.
ex)
"com.netpyoung.webp": "https://github.com/netpyoung/unity.webp.git?path=unity_project/Assets/unity.webp#0.3.8",
"com.system-community.systemruntimecompilerservicesunsafe": "https://github.com/system-community/SystemRuntimeCompilerServicesUnsafe.git?path=Assets/_Root#6.0.0",
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
-
BSD
Ref
- octo-code/webp-unity3d - License: Apache License