View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0.0
- Last updated
- First released
- Unity version
- 2022.3.62 or later
- Package size
- 1.7 MB
- Files
- 60
- Views in the past week
- 19
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $34.99 on
Keywords
WebP for Unity
A complete WebP codec for Unity, written entirely in managed C#. Decode, animate, and encode .webp with no native plugins, on every platform Unity targets, including WebGL.
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 8
WebP for Unity screenshot 1
About this asset
A complete WebP codec for Unity — encode and decode, still and animated, lossy and lossless, with alpha — written entirely in managed C#. It ships as one assembly with zero runtime dependencies. There is no .dll, .so, .a, or .aar to ship, sign, or debug. Unity compiles the same code for every target, so the same .webp decodes bit-identically in a Windows editor, on an iPhone, and on a WebGL page.
Display a .webp with no code. Drop the file into Assets/ and the editor importer turns it into a Texture2D, complete with a Project-window thumbnail and an inspector preview. At runtime, add a drop-on component to a GameObject — a uGUI RawImage or Image, a SpriteRenderer, or any Renderer. Point it at a path, StreamingAssets, a URL, a TextAsset, or raw bytes, and the image appears.
Stream from the web in one call. Fetch a .webp over UnityWebRequest straight into a Texture2D, with an optional memory and disk cache. Decoding runs on a background worker thread, and the texture upload is marshalled back to the main thread. The loaders come in async/Task, coroutine, and Awaitable forms, all cancellable.
Play animated WebP. The animation player component plays an animated .webp with play, pause, loop, speed, and seek, plus per-frame events. It streams frames by default to keep memory low, and can pre-decode short loops for zero per-frame cost.
Encode from Unity. The same package encodes a readable Texture2D, RenderTexture, or Color32 buffer back to WebP — lossy, lossless, near-lossless, and with alpha. Use it for screenshots, user-generated content, and runtime export.
Safe where native plugins break. The codec is reflection-free and driven entirely through its public API, so it is IL2CPP- and AOT-safe out of the box. A link.xml ships to survive code stripping at any level. Output is deterministic and bit-identical across platforms. The package runs under both Mono and IL2CPP, on desktop and mobile, and on WebGL.
From the publisher's Asset Store listing.
Technical details
- Decode still WebP — lossy, lossless, and alpha — and animated WebP.
- Encode to WebP — lossy, lossless, near-lossless, and alpha — from Texture2D, RenderTexture, or Color32.
- No-code editor importer — drop a .webp into Assets/ to get a Texture2D, with Project-window thumbnails and an inspector preview (size, format, alpha, animated).
- Drop-on display components — uGUI RawImage and Image, SpriteRenderer, and Renderer / Material, fed from path, StreamingAssets, URL, TextAsset, or bytes.
- Animated playback component — play, pause, stop, seek, loop, speed, and per-frame events; streaming or pre-decode.
- One-call URL loading over UnityWebRequest into a Texture2D, with a configurable memory and disk cache (WebGL degrades to memory-only).
- Async loaders — Task, coroutine, and Awaitable, all cancellable, with background decode and a main-thread upload.
- Zero-copy texture upload, plus an optional premultiplied-alpha mode for correct UI compositing.
- Opt-in Burst DSP backend — Burst-compiled kernels, bit-identical to the standard path.
- IL2CPP- and AOT-safe and deterministic — no reflection, no dynamic; a link.xml ships; bit-identical output across platforms.
- Built-in, URP, and HDRP — a decoded WebP is a plain RGBA32 Texture2D.
- Zero runtime dependencies — pure managed C#. Only the default com.unity.ugui package is needed, and only for the drop-on display components.
- Ready-to-run sample scenes — static image, animated playback, URL load, screenshot encode, and IL2CPP/AOT validation.
- Full documentation — a User's Guide, a generated API reference, and platform/IL2CPP notes.
Compatibility
| Unity version | Built-in | URP | HDRP | Custom |
|---|---|---|---|---|
| 2022.3.62f3 | Compatible | Compatible | Compatible | Compatible |
- Works with all render pipelines: Built-in, URP, HDRP, and custom SRPs.
- The uGUI and Sprite components need no setup on any pipeline.
- WebpRendererTexture and WebpAnimationPlayer write to the standard _MainTex/_BaseMap properties; on a custom shader that uses neither, set the texture property name on the component.
As listed on the Asset Store.