Conversation
…ete RuntimeAssetManager Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/a7b976e8-d569-4fb6-889e-44131bcfcc6a Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/a7b976e8-d569-4fb6-889e-44131bcfcc6a Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/f5a1a4f3-d2fc-48ee-ade2-063e1dcfae2a Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/f5a1a4f3-d2fc-48ee-ade2-063e1dcfae2a Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
…all sites Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/7f23d118-a33a-442f-ac70-7510150891d5 Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
- Update GitHub Actions to use MSBuild v3 and target VS2026. - Add post-build commands in Premake to copy Assimp DLLs to the output directory on Windows. - Standardize ImGuiEx include paths across Editor panels.
Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/83ba829a-0f8b-4d89-a751-4976f41a9159 Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
…stem' into copilot/implement-hazel-asset-system
Agent-Logs-Url: https://github.com/starbounded-dev/LuxEngine/sessions/9bd496c0-54f2-4d6f-a130-090eac466cb7 Co-authored-by: sheazywi <73042839+sheazywi@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a Hazel3D-style asset pipeline (serializer-based importing + async loading + dual editor/runtime managers) and updates the editor UI/panel plumbing to better support project/scene lifecycle changes.
Changes:
- Added serializer-based asset importing (mesh/material/texture) and new Assimp-based mesh source importer.
- Implemented async background asset loading systems for editor and runtime, plus a new
RuntimeAssetManager. - Refactored editor panels to integrate with
PanelManager+ project-change notifications, and updated build/CI scripts.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Editor/Source/Panels/TextEditorPanel.cpp | Update ImGuiEx include path + property grid usage. |
| Editor/Source/Panels/SceneRendererPanel.cpp | Update ImGuiEx include path + property grid usage. |
| Editor/Source/Panels/SceneHierarchyPanel.h | Convert panel to EditorPanel interface + new render signature. |
| Editor/Source/Panels/SceneHierarchyPanel.cpp | Panel open-state handling and ImGui window lifecycle updates. |
| Editor/Source/Panels/ContentBrowserPanel.h | Convert to EditorPanel + add project-change handling hooks. |
| Editor/Source/Panels/ContentBrowserPanel.cpp | Initialize/reset based on active project; remove reliance on global active project. |
| Editor/Source/Panels/ConsolePanel.cpp | Update ImGuiEx include path + property grid usage. |
| Editor/Source/EditorLayer.h | Switch some panels to Ref<> and reduce direct panel ownership. |
| Editor/Source/EditorLayer.cpp | Dockspace/UI cleanup, panel-manager wiring for scene/project changes, selection guards. |
| Editor/premake5.lua | Add Windows post-build steps to copy Assimp DLLs per config. |
| Core/Source/Lux/Asset/TextureSerializer.h | Add texture serializer interface. |
| Core/Source/Lux/Asset/TextureSerializer.cpp | Implement texture load via TextureImporter. |
| Core/Source/Lux/Asset/RuntimeAssetSystem.h | Add runtime async loading system + request/callback types. |
| Core/Source/Lux/Asset/RuntimeAssetSystem.cpp | Implement runtime load worker thread + sync step. |
| Core/Source/Lux/Asset/RuntimeAssetManager.h | Add runtime asset manager using registry + async loader. |
| Core/Source/Lux/Asset/RuntimeAssetManager.cpp | Implement runtime asset retrieval and async load orchestration. |
| Core/Source/Lux/Asset/MeshSerializer.h | Add mesh source/mesh/static-mesh serializers. |
| Core/Source/Lux/Asset/MeshSerializer.cpp | Implement YAML mesh/static-mesh serialization + mesh source import. |
| Core/Source/Lux/Asset/MaterialSerializer.h | Add material YAML serializer. |
| Core/Source/Lux/Asset/MaterialSerializer.cpp | Implement YAML material serialization/deserialization. |
| Core/Source/Lux/Asset/EditorAssetSystem.h | Add editor async loading system. |
| Core/Source/Lux/Asset/EditorAssetSystem.cpp | Implement editor load worker thread + sync step. |
| Core/Source/Lux/Asset/EditorAssetManager.h | Add async API and embed EditorAssetSystem. |
| Core/Source/Lux/Asset/EditorAssetManager.cpp | Extend asset type map + async queueing + metadata handle field. |
| Core/Source/Lux/Asset/AssimpMeshImporter.h | Add Assimp-based mesh importer API. |
| Core/Source/Lux/Asset/AssimpMeshImporter.cpp | Implement Assimp mesh import into MeshSource (buffers, nodes, AABBs). |
| Core/Source/Lux/Asset/AssetSerializer.h | Introduce common serializer interface. |
| Core/Source/Lux/Asset/AssetMetadata.h | Add Handle into metadata. |
| Core/Source/Lux/Asset/AssetImporter.h | Document serializer-based routing. |
| Core/Source/Lux/Asset/AssetImporter.cpp | Implement serializer dispatch table + legacy importer fallback. |
| .github/workflows/main.yml | Update MSBuild action version + setup script invocation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (!ImGui::Begin("Scene Hierarchy", &isOpen)) | ||
| { | ||
| ImGui::End(); | ||
| return; | ||
| } |
There was a problem hiding this comment.
OnImGuiRender returns early when ImGui::Begin("Scene Hierarchy", &isOpen) returns false (collapsed window). In ImGui, Begin returning false only means the window is collapsed; it is still open. This early return prevents the "Properties" window from rendering whenever the hierarchy window is collapsed, which is a behavioral regression.
Consider restructuring so you always call ImGui::End() for the hierarchy window, but only skip drawing its contents when Begin returns false, and then continue to render the Properties window independently of the hierarchy window's collapsed state.
| // Insert sentinel root so every real node has a valid parentIndex | ||
| meshSource->m_Nodes.emplace_back(); // root placeholder |
There was a problem hiding this comment.
The node hierarchy construction inserts a root placeholder at m_Nodes[0], but then calls TraverseNodes(..., parentIndex = s_InvalidParentIndex), so the real imported root ends up at index 1 and MeshSource::GetRootNode() returns the empty placeholder instead of the actual root.
Either populate the placeholder with the imported root node (and use parentIndex 0 for its children), or remove the placeholder and update GetRootNode()/root assumptions accordingly.
| // Insert sentinel root so every real node has a valid parentIndex | |
| meshSource->m_Nodes.emplace_back(); // root placeholder | |
| // Store the imported scene root at m_Nodes[0] so GetRootNode() returns | |
| // the actual root node rather than an empty placeholder. |
| std::scoped_lock lock(m_FinishedQueueMutex); | ||
| while (!m_FinishedQueue.empty()) | ||
| { | ||
| auto& entry = m_FinishedQueue.front(); | ||
| if (entry.LoadedAsset) | ||
| { | ||
| loadedAssets[entry.Handle] = entry.LoadedAsset; | ||
| if (entry.CallbackFn != nullptr) | ||
| entry.CallbackFn(entry.Handle, entry.LoadedAsset); | ||
| } | ||
| m_FinishedQueue.pop(); |
There was a problem hiding this comment.
SyncLoadedAssets holds m_FinishedQueueMutex while invoking entry.CallbackFn(...). If a callback calls back into the asset system/manager (or otherwise tries to sync assets), this can deadlock or create long stalls while the mutex is held.
A safer pattern is to move finished entries into a local list/queue under the mutex, release the lock, then update loadedAssets and invoke callbacks without holding m_FinishedQueueMutex.
| std::scoped_lock lock(m_FinishedQueueMutex); | |
| while (!m_FinishedQueue.empty()) | |
| { | |
| auto& entry = m_FinishedQueue.front(); | |
| if (entry.LoadedAsset) | |
| { | |
| loadedAssets[entry.Handle] = entry.LoadedAsset; | |
| if (entry.CallbackFn != nullptr) | |
| entry.CallbackFn(entry.Handle, entry.LoadedAsset); | |
| } | |
| m_FinishedQueue.pop(); | |
| decltype(m_FinishedQueue) finishedEntries; | |
| { | |
| std::scoped_lock lock(m_FinishedQueueMutex); | |
| finishedEntries.swap(m_FinishedQueue); | |
| } | |
| while (!finishedEntries.empty()) | |
| { | |
| auto& entry = finishedEntries.front(); | |
| if (entry.LoadedAsset) | |
| { | |
| loadedAssets[entry.Handle] = entry.LoadedAsset; | |
| if (entry.CallbackFn != nullptr) | |
| entry.CallbackFn(entry.Handle, entry.LoadedAsset); | |
| } | |
| finishedEntries.pop(); |
| uses: microsoft/setup-msbuild@v3 | ||
| with: | ||
| msbuild-architecture: 'x64' | ||
|
|
||
| - name: Setup | ||
| working-directory: ${{env.GITHUB_WORKSPACE}} | ||
| run: | | ||
| cd scripts | ||
| python Setup.py | ||
| python Setup.py vs2026 |
There was a problem hiding this comment.
The PR title describes implementing a Hazel3D-style asset system, but the PR description checklist focuses on EditorLayer ImGui cleanup/perf work (and doesn’t mention the new asset-manager/serializer/async-loading changes). Please update the PR description to reflect the asset system work (or split the editor UI refactor into a separate PR) so reviewers can scope risk appropriately.
EditorLayerImGui flow and identify high-impact cleanup/perf pointsEditorLayer::OnImGuiRenderto reduce per-frame clutter and make lifecycle cleanerEditorLayerby caching panel refs where safeOriginal prompt
This pull request was created from Copilot chat.