3#include "entt/core/fwd.hpp"
29 std::unordered_map<entt::id_type, std::shared_ptr<inspector>>
type_map;
139 void push_segment(
const std::string& segment,
const std::string& pretty_segment);
229 const entt::meta_type& component_type,
230 const std::string& property_path);
240 const std::string& component_type_name,
241 const std::string& component_pretty_type_name,
242 const std::string& property_path);
255 hpp::uuid entity_uuid,
256 const std::string& component_type,
257 const std::string& property_path) -> bool;
267 prefab_override_context& override_ctx,
268 inspect_result& result,
269 const meta_any_proxy& var_proxy,
270 const entt::meta_any& old_var,
271 const entt::meta_any& new_var,
272 const entt::meta_custom& custom);
300 const meta_any_proxy& var_proxy,
301 const var_info& info = {},
302 const entt::meta_custom& custom = {}) -> inspect_result;
315 const meta_any_proxy& var_proxy,
316 const var_info& info = {},
317 const entt::meta_custom& custom = {}) -> inspect_result;
331 const meta_any_proxy& var_proxy,
332 const entt::meta_data& prop,
333 const var_info& info = {},
334 const entt::meta_custom& custom = {}) -> inspect_result;
349 const meta_any_proxy& var_proxy,
350 const std::string&
name,
352 const var_info& info = {},
353 const entt::meta_custom& custom = {}) -> inspect_result;
367 const meta_any_proxy& var_proxy,
368 const entt::meta_data& prop,
369 const var_info& info = {},
370 const entt::meta_custom& custom = {}) -> inspect_result;
382 const meta_any_proxy& var_proxy,
383 const var_info& info = {}) -> inspect_result;
395 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.
void pop_debug_view()
Pops debug view mode (decreases debug view counter)
auto inspect(rtti::context &ctx, T &obj) -> inspect_result
Convenience template function for inspecting objects of known type.
void add_property_action(rtti::context &ctx, prefab_override_context &override_ctx, inspect_result &result, const meta_any_proxy &var_proxy, const entt::meta_any &old_var, const entt::meta_any &new_var, const entt::meta_custom &custom)
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 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.
Represents a handle to an asset, providing access and management functions.
Result of an inspection operation indicating what changes occurred.
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_property_as_changed(entt::handle entity, const entt::meta_type &component_type, const std::string &property_path)
Marks a specific property as changed using component type.
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.
bool is_active
Whether we're currently inspecting a prefab instance.
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_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 generic prefab with a buffer for serialized data.
Represents a scene in the ACE framework, managing entities and their relationships.