asset-promise-lifecycle

Manage asynchronous ECS asset loading with memory budgeting and cache dereferencing.

23|17|Updated Apr 16, 2023
One-click install
npx skills add https://github.com/decentraland/unity-explorer --skill asset-promise-lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asset-promise-lifecycle
Source: https://github.com/decentraland/unity-explorer/tree/main/.claude/skills/asset-promise-lifecycle
Command: npx skills add https://github.com/decentraland/unity-explorer --skill asset-promise-lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill streamlines the complex process of asynchronously loading and managing various assets (textures, models, audio, wearables) within the ECS, ensuring efficient memory usage and a smooth user experience.

Core Features & Use Cases

  • Asynchronous Loading: Handles the creation, polling, and consumption of asset promises for non-blocking asset loading.
  • Memory Management: Integrates with memory budgeting and cache dereferencing to prevent memory leaks and optimize resource unloading.
  • Error Handling: Provides robust mechanisms for managing loading failures and reporting exceptions.
  • Use Case: When a new scene loads, this Skill ensures that all necessary textures and 3D models are fetched efficiently without freezing the application, and cleans them up when no longer needed.

Quick Start

Use the asset-promise-lifecycle skill to create a new texture promise for a given source URL.

Frequently Asked Questions about asset-promise-lifecycle

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

FAQPage Schema
How do I load textures and 3D models asynchronously in ECS without freezing the application?

Asynchronous loading in ECS uses promises to fetch textures and 3D models without blocking the main thread. This Skill manages the creation, polling, and consumption of these asset promises to ensure non-blocking scene loading.

What is the best way to handle memory management and resource unloading for streaming assets?

Memory management for streaming assets integrates memory budgeting and cache dereferencing to prevent leaks. This Skill handles resource unloading by cleaning up asset promises once textures and models are no longer needed.

How does asset promise lifecycle handle loading failures and error reporting?

Asset promise lifecycle error handling provides robust mechanisms for managing loading failures and reporting exceptions. It ensures that failed asynchronous asset loading tasks for textures and models are properly caught and processed.

Can I use this async loading pipeline for audio and wearables in addition to models?

Yes, the async loading pipeline supports audio and wearables alongside textures and models. It manages the complete lifecycle of asynchronous ECS asset loading for all supported asset types within the same framework.

Why do I need a dedicated lifecycle manager for asynchronous asset loading pipelines?

A dedicated lifecycle manager for asynchronous asset loading pipelines is needed to coordinate memory budgeting and cache dereferencing. It prevents memory leaks by ensuring resource unloading occurs when assets are no longer consumed.