LDKComponentDesc
typedef struct LDKComponentDesc{
const char *name;
u32 type;
u32 entry_size;
u32 initial_capacity;
u32 flags;
const u32 *required_components;
u32 required_component_count;
LDKComponentAttachFn attach;
LDKComponentDestroyFn destroy;
void *user;
}LDKComponentDesc;
LDKComponentFlags
A descriptor that identifies a Component.
Components are plain data structures that can be attached to entities.
Component types needs to be registered before they are used.
typedef enum LDKComponentFlags{
LDK_COMPONENT_FLAG_NONE=0,
LDK_COMPONENT_FLAG_HIDE_IN_INSPECTOR=1<<0
}LDKComponentFlags;
ldk_component_desc_get
Get the component desc.
LDK_API bool ldk_component_desc_get(
LDKComponentRegistry *registry,
u32 type,
LDKComponentDesc *out_desc
);
Parameters
LDKComponentRegistry *registry
- Registry on which the operation is performed.
u32 type
- Type identifier or kind used by the operation.
LDKComponentDesc *out_desc
- Receives the descriptor.
Returns
True if the operation succeeds; false otherwise.