23auto should_use_prefab_inspection(entt::meta_any& selected) ->
bool
25 if(selected.type() != entt::resolve<entt::handle>())
30 auto entity = selected.cast<entt::handle>();
44auto inspect_object_with_prefab_check(
rtti::context& ctx, entt::meta_any&
object) ->
void
46 auto& override_ctx = ctx.get_cached<prefab_override_context>();
49 if(should_use_prefab_inspection(
object))
51 auto entity =
object.cast<entt::handle>();
53 if(override_ctx.begin_prefab_inspection(
entity))
59 override_ctx.end_prefab_inspection();
65 if(
object.
type() == entt::resolve<entt::handle>())
67 auto entity =
object.cast<entt::handle>();
98 if(ImGui::Begin(
name,
nullptr, ImGuiWindowFlags_MenuBar))
105 if(ImGui::BeginMenuBar())
107 bool locked = !!locked_object_;
115 locked_object_ = selected;
123 ImGui::SetItemTooltipEx(
"%s",
"Lock/Unlock Inspector");
130 ImGui::SetItemTooltipEx(
"%s",
"Debug View");
140 em.push_undo_stack_enabled(
true);
142 auto selections_count = int(em.get_selections().size());
146 inspect_object_with_prefab_check(ctx, locked_object_);
148 else if(em.get_selections().size() > 1)
150 ImGui::Text(
"%d Items Selected.", selections_count);
154 inspect_object_with_prefab_check(ctx, selected);
162 em.pop_undo_stack_enabled();
static auto get_entity_name(entt::handle entity) -> std::string
Gets the entity name from tag component.
void on_frame_ui_render()
void init(rtti::context &ctx)
inspector_panel(imgui_panels *parent)
void deinit(rtti::context &ctx)
#define ICON_MDI_LOCK_OPEN_VARIANT
void pop_debug_view()
Pops debug view mode (decreases debug view counter)
void push_debug_view()
Pushes debug view mode (increases debug view counter)
auto make_proxy(entt::meta_any &var, const std::string &name) -> meta_any_proxy
Creates a simple proxy for direct variable access.
auto inspect_var(rtti::context &ctx, entt::meta_any &var, const meta_any_proxy &var_proxy, const var_info &info, const entt::meta_custom &custom) -> inspect_result
Main entry point for inspecting any variable with automatic type resolution.
auto add(Args &&... args) -> T &
auto get_active_selection() const -> const entt::meta_any &
Registry for managing type-specific inspector instances.
Global context for tracking prefab override changes during inspection.