Skip to content

Implement Hazel3D-style dual-manager asset system with async loading and specialized serializers#25

Draft
Copilot wants to merge 6 commits intodevfrom
copilot/implement-hazel-asset-system
Draft

Implement Hazel3D-style dual-manager asset system with async loading and specialized serializers#25
Copilot wants to merge 6 commits intodevfrom
copilot/implement-hazel-asset-system

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 7, 2026

  • Inspect failing files and confirm likely root causes from current code
  • Run existing build entrypoint before edits (blocked by missing premake5/Vulkan SDK in environment)
  • Fix RuntimeAssetSystem.h callback/type declarations to avoid MSVC template parsing failure
  • Fix Editor panel usages of ImGuiEx::BeginPropertyGrid() (void API used in conditionals)
  • Run available validation checks after edits (same environment limitation)
  • Commit and push fixes
Original prompt

Implement the Hazel Engine's asset system in LuxEngine. The new asset system should include the dual manager architecture (EditorAssetManager and RuntimeAssetManager), specialized serializers (like MeshSerializer, TextureSerializer), asynchronous loading threads (EditorAssetSystem and RuntimeAssetSystem), and YAML-based metadata tracking, mirroring the provided Hazel3D implementation.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Can you remake my asset system, exactly the same as the Hazel3D engine,

Assistant: I can certainly help you understand the architecture of the asset system you've shared so you can implement these concepts in your own engine, though I cannot rewrite or reproduce the exact engine source code line-by-line.

Based on the files provided, here is a high-level summary of how this asset system is structured:

  • Core Asset Representation: Everything revolves around an Asset base class that contains a UUID (AssetHandle) and an AssetType enum.
  • Dual Manager Architecture: The system uses a virtual AssetManagerBase with two distinct implementations:
    • EditorAssetManager: Designed for development. It relies on an AssetRegistry to map UUIDs to file paths, reads metadata from disk, supports YAML-based serialization, handles hot-reloading, and tracks file modifications.
    • RuntimeAssetManager: Optimized for the shipped game. It bypasses individual files and instead loads packed, binary asset data from an AssetPack.
  • Specialized Serializers: A factory pattern (AssetImporter) routes different asset types (meshes, materials, audio configs, etc.) to specific serializers inherited from AssetSerializer. These handle both YAML (editor) and binary stream (runtime) parsing.
  • Asynchronous Loading: Dedicated background threads (EditorAssetSystem and RuntimeAssetSystem) manage a thread-safe queue of loading requests (AssetMetadata or RuntimeAssetLoadRequest). Once an asset is loaded in the background, it is synced back to the main thread's loaded asset map.

We can explore how to build out your own asset system using these design patterns. Would you like to dive deeper into how the asynchronous loading thread is implemented, or focus on how the EditorAssetManager tracks file dependencies and metadata?

User: Let's just make the asset system the same as the Hazel Engine

Assistant: I've initiated the process to implement the new asset system, and I'm currently waiting for your approval on the dialog to proceed.

This pull request was created from Copilot chat.

Copilot AI and others added 2 commits April 7, 2026 04:36
Copilot AI changed the title [WIP] Add dual manager architecture and serializers for asset system Implement Hazel3D-style dual-manager asset system with async loading and specialized serializers Apr 7, 2026
Copilot AI requested a review from sheazywi April 7, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants