Replace external ImGui entt entity editor with in-engine editor panels - #195
Merged
Conversation
World Outline and Entity Editor are now first-party, re-usable FlingEditorPanel-derived classes in the Editor module, backed by the existing ComponentTypeRegistry (create/destroy/drawEditorWidget hooks) instead of the vendored library's own registration scheme. Adds an entity rename field, an Add Entity button, and drops the now-unused imgui_entt_entity_editor submodule. Also fixes two crashes surfaced by actually exercising this UI: a dangling ComponentTypeInfo::name pointer from std::vector reallocation, and a null MeshRenderer uniform buffer from an unnecessary registry.replace() call in the material picker. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BaseEditor::DrawWorldOutline/component editor out into two re-usable,FlingEditorPanel-derived classes in the Editor module:WorldOutlinePanel(entity list, Add Entity, delete, selection) andEntityEditorPanel(component list, Add/Remove Component, entity rename field).ComponentTypeRegistry(newcreate/destroy/drawEditorWidgethooks +SetEditorWidget) instead of the vendoredimgui_entt_entity_editorlibrary's separate registration scheme.external/imgui_entt_entity_editorsubmodule and its CMake include path.ComponentTypeInfo::namepointers dangled afterstd::vector<std::string>reallocation (ComponentTypeRegistry::AddType); switched the backing storage tostd::dequefor pointer stability.registry.replace<MeshRenderer>()after already updating the material in place, which constructed a freshMeshRendererwith a null uniform buffer (onlyon_construct, noton_replace, reallocates it) and crashed the next render pass. Removed the redundantreplace()call.Test plan
cmake -B build && cmake --build build --parallel— clean build, no warnings./build/FlingTests/bin/FlingTests— 172 assertions / 17 cases passpython3 scripts/check_comment_style.py— passes🤖 Generated with Claude Code