unity-yooasset

Guides correct usage of YooAsset v2.3.18 APIs for Unity asset bundle management.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/Dylan8865/FinalYearProject --skill unity-yooasset-dylan8865
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unity-yooasset
Source: https://github.com/Dylan8865/FinalYearProject/tree/main/GameDev/Tester/.agents/skills/unity-skills/skills/yooasset-design
Command: npx skills add https://github.com/Dylan8865/FinalYearProject --skill unity-yooasset-dylan8865

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing YooAsset code in Unity often leads to subtle bugs: leaked asset handles, wrong PlayMode parameter classes, hallucinated legacy APIs, and broken build pipelines. This Skill provides source-verified reference rules for YooAsset v2.3.18 so generated code compiles and behaves correctly. ## Core Features & Use Cases - Lifecycle & Initialization Rules: Enforces the correct YooAssets.Initialize, CreatePackage, InitializeAsync, and DestroyAsync sequence with platform guards for WebGL and Editor modes. - Loading, Handles & Refcounting: Documents the five load families (Asset, SubAssets, AllAssets, RawFile, Scene), handle release semantics, and the Behaviour-type load guard. - Build & FileSystem Configuration: Covers AssetBundleBuilder, BuildParameters, IFilterRule's required FindAssetType, FileSystemParameters factories, and decryption/remote services. - Pitfalls Checklist: Lists 30 common AI-generated mistakes plus a legacy API migration table (e.g., removed timeout parameter, nonexistent UpdatePackageVersionOperation). - Use Case: When asked to write a Unity hot-update flow, the Skill ensures the agent emits RequestPackageVersionAsync, drains loaders before UpdatePackageManifestAsync, and wires downloader callbacks with plain assignment instead of +=. ## Quick Start Ask the agent to write a YooAsset host-play-mode initialization and asset loading flow for Unity, and it will apply the verified v2.3.18 rules automatically.

Frequently Asked Questions about unity-yooasset

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize YooAsset in Unity with host play mode?▼

Call YooAssets.Initialize() once, create the package with YooAssets.CreatePackage, then call InitializeAsync with HostPlayModeParameters containing buildin and cache FileSystemParameters. Await the operation and check Status == Succeed before any load calls.

How do I load and release assets with YooAsset handles?▼

Use package.LoadAssetAsync<T>(location), await the handle via yield, Task, or the Completed event, then call handle.Release() when done. Releasing drops the bundle refcount; forgetting it prevents UnloadUnusedAssetsAsync from freeing memory.

Does YooAsset support WebGL builds?▼

Yes, but only WebPlayMode is permitted on WebGL; HostPlayMode, OfflinePlayMode, and EditorSimulateMode throw exceptions. Use WebPlayModeParameters with WebServerFileSystemParameters and optionally WebRemoteFileSystemParameters for a remote CDN.

Why does my YooAsset IFilterRule fail to compile in 2.3.18?▼

Since version 2.3.16, IFilterRule requires a FindAssetType property in addition to IsCollectAsset. Add something like public string FindAssetType => "t:Prefab"; to narrow the asset search scope and satisfy the interface.

Why does YooAsset LoadAssetAsync reject MonoBehaviour types?▼

YooAsset's type guard rejects any type derived from UnityEngine.Behaviour because components cannot exist as standalone assets. Load the GameObject prefab instead, then call GetComponent<T>() on the instantiated object.

What is the correct YooAsset package update flow?▼

Call RequestPackageVersionAsync first, then release all handles and run UnloadAllAssetsAsync, then UpdatePackageManifestAsync with the requested version, and only then CreateResourceDownloader. Skipping steps causes stale manifests or missed bundles.