LDKPropertyValue
typedef struct LDKPropertyValue{
LDKFieldType type;
Vec4 vector;
i64 integer;
XSmallstr string;
}LDKPropertyValue;
Shared runtime/editor access to reflected component properties.
typedef struct LDKPropertyValue{
LDKFieldType type;
Vec4 vector;
i64 integer;
XSmallstr string;
}LDKPropertyValue;
Check whether a reflected field is writable and has an animation value codec.
LDK_API bool ldk_property_field_supported(const LDKComponentFieldMeta *field);
const LDKComponentFieldMeta *fieldTrue for supported non-readonly fields; hidden fields are absent from metadata.
Find component metadata using the runtime ECS component type.
LDK_API const LDKComponentMeta * ldk_property_component_meta(u32 component_type);
u32 component_typeMetadata pointer, or NULL if no compatible registration exists.
Find a reflected field in runtime component metadata.
LDK_API const LDKComponentFieldMeta * ldk_property_field_find(
u32 component_type,
const char *field_name
);
u32 component_typeconst char *field_nameField metadata pointer, or NULL when unavailable.
Read a supported component field into a type-tagged value.
LDK_API bool ldk_property_get(
LDKEntity entity,
u32 component_type,
const char *field_name,
LDKPropertyValue *out
);
LDKEntity entityu32 component_typeconst char *field_nameLDKPropertyValue *outTrue when the entity has the component and the reflected value is valid.
Specialized setter for a reflected field requiring side effects.
typedef bool(*LDKPropertyWriterFn)(LDKEntity entity, const LDKPropertyValue *value, void *user);
entityvalueuserTrue on successful application, false on failure.
Register or replace a specialized setter for a reflected field.
LDK_API bool ldk_property_writer_register(
u32 component_type,
const char *field_name,
LDKPropertyWriterFn callback,
void *user
);
u32 component_typeconst char *field_nameLDKPropertyWriterFn callbackvoid *userTrue on success. Writer must apply the value and return its status.
Clear registered property writer callbacks before unloading their code.
LDK_API void ldk_property_writers_clear(void);
Nothing. Must be called before unloading game-module callbacks.
Validate and assign a component field using a registered writer or native setter.
LDK_API bool ldk_property_set(
LDKEntity entity,
u32 component_type,
const char *field_name,
const LDKPropertyValue *value
);
LDKEntity entityu32 component_typeconst char *field_nameconst LDKPropertyValue *valueTrue if the field accepted the value. Unchanged values do not invoke setters.
Interpolate or step between two supported typed property values.
LDK_API bool ldk_property_interpolate(
const LDKComponentFieldMeta *field,
const LDKPropertyValue *a,
const LDKPropertyValue *b,
float alpha,
LDKPropertyValue *out
);
const LDKComponentFieldMeta *fieldconst LDKPropertyValue *aconst LDKPropertyValue *bfloat alphaLDKPropertyValue *outTrue when both values match the reflected field and are valid.