LDKComponentRef
Stable reference to a component through its owning entity.
typedef struct LDKComponentRef{
LDKEntity entity;
u16 version;
u16 slot_index;
}LDKComponentRef;
Stable reference to a component through its owning entity.
typedef struct LDKComponentRef{
LDKEntity entity;
u16 version;
u16 slot_index;
}LDKComponentRef;
Resolve a component reference to its data.
LDK_API void * ldk_component_ref_get(
LDKEntityRegistry *entity_system,
struct LDKComponentRegistry *component_registry,
LDKComponentRef ref
);
LDKEntityRegistry *entity_systemstruct LDKComponentRegistry *component_registryLDKComponentRef refPointer to the requested object or data; NULL when unavailable.
Resolve a component reference as read-only data.
LDK_API const void * ldk_component_ref_get_const(
LDKEntityRegistry *entity_system,
struct LDKComponentRegistry *component_registry,
LDKComponentRef ref
);
LDKEntityRegistry *entity_systemstruct LDKComponentRegistry *component_registryLDKComponentRef refPointer to the requested object or data; NULL when unavailable.
Check whether the component ref is valid.
LDK_API bool ldk_component_ref_is_valid(
LDKEntityRegistry *system,
LDKComponentRef ref
);
LDKEntityRegistry *systemLDKComponentRef refTrue when the queried condition holds; false otherwise.
Get the entity component ref.
LDK_API bool ldk_entity_component_ref_get(
LDKEntityRegistry *system,
LDKEntity entity,
u32 component_type,
LDKComponentRef *out_ref
);
LDKEntityRegistry *systemLDKEntity entityu32 component_typeLDKComponentRef *out_refTrue if the operation succeeds; false otherwise.