3#include "entt/core/fwd.hpp"
29 std::unordered_map<entt::id_type, std::shared_ptr<inspector>>
type_map;
144 void push_segment(
const std::string& segment,
const std::string& pretty_segment);
236 const entt::meta_type& component_type,
237 const std::string& property_path,
238 const std::string& property_pretty_path = {});
248 const std::string& component_type_name,
249 const std::string& component_pretty_type_name,
250 const std::string& property_path,
251 const std::string& property_pretty_path = {});
264 hpp::uuid entity_uuid,
265 const std::string& component_type,
266 const std::string& property_path) -> bool;
276 prefab_override_context& override_ctx,
277 inspect_result& result,
278 meta_any_proxy& var_proxy,
279 const entt::meta_any& old_var,
280 const entt::meta_any& new_var,
281 const entt::meta_custom& custom) -> bool;
309 const meta_any_proxy& var_proxy,
310 const var_info& info = {},
311 const entt::meta_custom& custom = {}) -> inspect_result;
324 const meta_any_proxy& var_proxy,
325 const var_info& info = {},
326 const entt::meta_custom& custom = {}) -> inspect_result;
340 const meta_any_proxy& var_proxy,
341 const entt::meta_data& prop,
342 const var_info& info = {},
343 const entt::meta_custom& custom = {}) -> inspect_result;
358 const meta_any_proxy& var_proxy,
359 const std::string&
name,
361 const var_info& info = {},
362 const entt::meta_custom& custom = {}) -> inspect_result;
376 const meta_any_proxy& var_proxy,
377 const entt::meta_data& prop,
378 const var_info& info = {},
379 const entt::meta_custom& custom = {}) -> inspect_result;
391 const meta_any_proxy& var_proxy,
392 const var_info& info = {}) -> inspect_result;
404 entt::meta_any var = entt::forward_as_meta(obj);
Context holder for tracking the current property path during inspection.
auto get_current_path_with_component_type() const -> std::string
auto get_entity_uuid() const -> hpp::uuid
Get the entity UUID.
auto add_property_action(rtti::context &ctx, prefab_override_context &override_ctx, inspect_result &result, meta_any_proxy &var_proxy, const entt::meta_any &old_var, const entt::meta_any &new_var, const entt::meta_custom &custom) -> bool
void pop_debug_view()
Pops debug view mode (decreases debug view counter)
auto inspect_associative_container(rtti::context &ctx, entt::meta_any &var, const meta_any_proxy &var_proxy, const entt::meta_data &prop, const var_info &info, const entt::meta_custom &custom) -> inspect_result
Inspects associative containers like maps and sets.
auto inspect_var_properties(rtti::context &ctx, entt::meta_any &var, const meta_any_proxy &var_proxy, const var_info &info, const entt::meta_custom &custom) -> inspect_result
Inspects all properties of a complex object recursively.
void push_debug_view()
Pushes debug view mode (increases debug view counter)
auto inspect(rtti::context &ctx, T &obj, const std::string &name={}) -> inspect_result
Convenience template function for inspecting objects of known type.
auto is_debug_view() -> bool
Checks if currently in debug view mode.
auto make_proxy(entt::meta_any &var, const std::string &name) -> meta_any_proxy
Creates a simple proxy for direct variable access.
auto inspect_array(rtti::context &ctx, entt::meta_any &var, const meta_any_proxy &var_proxy, const entt::meta_data &prop, const var_info &info, const entt::meta_custom &custom) -> inspect_result
Inspects array-like containers with add/remove functionality.
auto inspect_enum(rtti::context &ctx, entt::meta_any &var, const meta_any_proxy &var_proxy, const var_info &info) -> inspect_result
Inspects enumeration types with dropdown selection.
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.
std::vector< float > scale
std::vector< math::quat > rotation
Thread-safe handle to an asset.
entt::registry * inspected_registry
Registry for managing type-specific inspector instances.
inspector_registry()
Constructor that auto-discovers and registers all inspector types.
std::unordered_map< entt::id_type, std::shared_ptr< inspector > > type_map
Map from type ID to inspector instance for fast lookup.
Global context for tracking prefab override changes during inspection.
void end_prefab_inspection()
End prefab inspection context and clean up state.
scene prefab_scene
Temporary scene for prefab comparison operations.
entt::handle prefab_root_entity
The prefab root entity that contains the prefab_component.
static auto exists_in_prefab(scene &cache_scene, const asset_handle< prefab > &prefab, hpp::uuid entity_uuid, const std::string &component_type, const std::string &property_path) -> bool
Checks if a property exists in the original prefab.
void set_entity_uuid(const hpp::uuid &uuid)
Sets the entity UUID for both path contexts.
std::function< bool(const hpp::uuid &entity_uuid, const std::string &component_path)> is_path_overridden_callback
Callback function to check if a specific property path is already overridden.
property_path_context pretty_path_context
Current property path context for human-readable paths.
entt::handle entity
The specific entity currently being inspected.
auto is_path_overridden() const -> bool
Check if the current property path is already overridden.
prefab_override_context()=default
Default constructor.
static void mark_transform_global_as_changed(entt::handle entity, bool position, bool rotation, bool scale, bool skew)
uintptr_t prefab_version
Version tracking for prefab changes.
static auto find_prefab_root_entity(entt::handle entity) -> entt::handle
Finds the prefab root entity by traversing up the parent hierarchy.
static void mark_material_as_changed(entt::handle entity)
Marks material as changed in prefab override system.
static void mark_text_area_as_changed(entt::handle entity)
Marks text area as changed in prefab override system.
property_path_context path_context
Current property path context for serialization paths.
void set_component_type(const std::string &type, const std::string &pretty_type)
Sets the component type for both path contexts.
auto record_override() -> bool
Record a property override when a change is detected.
static void mark_entity_as_removed(entt::handle entity)
Marks an entity as removed from the prefab instance.
auto reset_override() -> bool
bool is_active
Whether we're currently inspecting a prefab instance.
static void mark_ui_document_size_as_changed(entt::handle entity)
void push_segment(const std::string &segment, const std::string &pretty_segment)
Pushes a new path segment onto both contexts and applies override styling.
static void mark_property_as_changed(entt::handle entity, const entt::meta_type &component_type, const std::string &property_path, const std::string &property_pretty_path={})
Marks a specific property as changed using component type.
static void mark_active_as_changed(entt::handle entity)
Marks entity active state as changed in prefab override system.
static void mark_transform_as_changed(entt::handle entity, bool position, bool rotation, bool scale, bool skew)
Marks transform properties as changed in prefab override system.
void pop_segment()
Pops the last path segment and removes override styling if needed.
static auto get_entity_prefab_uuid(entt::handle entity) -> hpp::uuid
Gets the prefab UUID of an entity from its prefab_id_component.
auto begin_prefab_inspection(entt::handle entity) -> bool
Initialize context for inspecting a prefab instance.
Stores both pretty and serialization paths for a prefab override.
static auto create(const std::string &pretty, const std::string &serialization) -> prefab_property_ override
Creates override from pretty path and serialization path.
auto operator<(const prefab_property_override &other) const -> bool
Less-than comparison for sorting based on serialization path.
auto operator==(const prefab_property_override &other) const -> bool
Equality comparison based on serialization path.
std::string pretty_path
Human-readable path for inspector display (e.g., "Transform/Position/X")
std::string serialization_path
Technical path for deserialization matching (e.g., "entities[0]/components/Transform/local_transform/...
prefab_property_override()=default
Default constructor.
Represents a scene in the ACE framework, managing entities and their relationships.