13 entt::meta_factory<prefab_property_override_data>{}
14 .type(
"prefab_property_override_data"_hs)
19 .data<&prefab_property_override_data::entity_uuid>(
"entity_uuid"_hs)
24 .data<&prefab_property_override_data::component_path>(
"component_path"_hs)
29 .data<&prefab_property_override_data::pretty_component_path>(
"pretty_component_path"_hs)
38 try_save(ar, ser20::make_nvp(
"entity_uuid", obj.entity_uuid));
39 try_save(ar, ser20::make_nvp(
"component_path", obj.component_path));
40 try_save(ar, ser20::make_nvp(
"pretty_component_path", obj.pretty_component_path));
44 try_load(ar, ser20::make_nvp(
"entity_uuid", obj.entity_uuid));
45 try_load(ar, ser20::make_nvp(
"component_path", obj.component_path));
46 try_load(ar, ser20::make_nvp(
"pretty_component_path", obj.pretty_component_path));
51 entt::meta_factory<prefab_component>{}
52 .type(
"prefab_component"_hs)
68 .data<&prefab_component::property_overrides>(
"property_overrides"_hs)
73 .data<&prefab_component::removed_entities>(
"removed_entities"_hs)
82 try_save(ar, ser20::make_nvp(
"source", obj.source));
83 try_save(ar, ser20::make_nvp(
"property_overrides", obj.property_overrides));
84 try_save(ar, ser20::make_nvp(
"removed_entities", obj.removed_entities));
91 try_load(ar, ser20::make_nvp(
"source", obj.source));
92 try_load(ar, ser20::make_nvp(
"property_overrides", obj.property_overrides));
93 try_load(ar, ser20::make_nvp(
"removed_entities", obj.removed_entities));
100 entt::meta_factory<prefab_id_component>{}
101 .type(
"prefab_id_component"_hs)
116 entt::attribute{
"tooltip",
"This is the unique id of the entity in the prefab."},
123 try_save(ar, ser20::make_nvp(
"id", hpp::to_string(obj.id)));
132 if(
try_load(ar, ser20::make_nvp(
"id", suuid)))
134 auto id = hpp::uuid::from_string(suuid);
135 obj.id =
id.value_or(hpp::uuid{});
attributes::value_type attribute
std::map< std::string, meta_any > attributes
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
Component that holds a reference to a prefab asset and tracks property overrides.
asset_handle< prefab > source
Handle to the prefab asset.
Component that provides a unique identifier (UUID) for a prefab.
hpp::uuid id
The unique identifier for the entity.
Represents a property override with entity UUID and component/property path.