Struct in ldk_property.h

LDKPropertyValue

typedef struct LDKPropertyValue{
  LDKFieldType type;
  Vec4 vector;
  i64 integer;
  XSmallstr string;
}LDKPropertyValue;
Typedef in ldk_property.h

LDKPropertyWriterFn

Specialized setter for a reflected field requiring side effects.

typedef bool(*LDKPropertyWriterFn)(LDKEntity entity, const LDKPropertyValue *value, void *user);

Parameters

entity
Entity containing the property.
value
Validated value to apply.
user
Opaque registration context.

Returns

True on successful application, false on failure.

Function in ldk_property.h

ldk_property_component_meta

Find component metadata using the runtime ECS component type.

LDK_API const LDKComponentMeta * ldk_property_component_meta(u32 component_type);

Parameters

u32 component_type
Runtime ECS component type.

Returns

Metadata pointer, or NULL if no compatible registration exists.

Function in ldk_property.h

ldk_property_field_find

Find a reflected field in runtime component metadata.

LDK_API const LDKComponentFieldMeta * ldk_property_field_find(
 u32 component_type,
 const char *field_name
);

Parameters

u32 component_type
Runtime ECS component type.
const char *field_name
Persistent reflected property name.

Returns

Field metadata pointer, or NULL when unavailable.

Function in ldk_property.h

ldk_property_field_supported

Check whether a reflected field is writable and has an animation value codec.

LDK_API bool ldk_property_field_supported(const LDKComponentFieldMeta *field);

Parameters

const LDKComponentFieldMeta *field
Metadata describing the property.

Returns

True for supported non-readonly fields; hidden fields are absent from metadata.

Function in ldk_property.h

ldk_property_get

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
);

Parameters

LDKEntity entity
Target ECS entity.
u32 component_type
Runtime ECS component type.
const char *field_name
Persistent reflected property name.
LDKPropertyValue *out
Receives the type-tagged property value.

Returns

True when the entity has the component and the reflected value is valid.

Function in ldk_property.h

ldk_property_interpolate

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
);

Parameters

const LDKComponentFieldMeta *field
Metadata describing the property.
const LDKPropertyValue *a
First property value.
const LDKPropertyValue *b
Second property value.
float alpha
Interpolation factor in [0,1].
LDKPropertyValue *out
Receives the interpolated type-tagged value.

Returns

True when both values match the reflected field and are valid.

Function in ldk_property.h

ldk_property_set

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
);

Parameters

LDKEntity entity
Target ECS entity.
u32 component_type
Runtime ECS component type.
const char *field_name
Persistent reflected property name.
const LDKPropertyValue *value
Type-tagged property value.

Returns

True if the field accepted the value. Unchanged values do not invoke setters.

Function in ldk_property.h

ldk_property_writer_register

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
);

Parameters

u32 component_type
Runtime ECS component type.
const char *field_name
Persistent reflected property name.
LDKPropertyWriterFn callback
Function responsible for writing the value.
void *user
Opaque callback context.

Returns

True on success. Writer must apply the value and return its status.

Function in ldk_property.h

ldk_property_writers_clear

Clear registered property writer callbacks before unloading their code.

LDK_API void ldk_property_writers_clear(void);

Returns

Nothing. Must be called before unloading game-module callbacks.