Pico Headers
Loading...
Searching...
No Matches
Public Attributes | List of all members
ecs_comp_desc_t Struct Reference

Optional parameters for component definition. More...

#include <pico_ecs.h>

Collaboration diagram for ecs_comp_desc_t:
Collaboration graph
[legend]

Public Attributes

ecs_on_add_fn on_add_cb
 
ecs_on_remove_fn on_remove_cb
 
ecs_on_set_fn on_set_cb
 
void * default_value
 
size_t args_size
 
void * udata
 

Detailed Description

Optional parameters for component definition.

Parameters
on_add_cbCalled when a component is added to an entity (can be NULL)
on_remove_cbCalled when a component is removed from an entity (can be NULL)
on_set_cbCalled when a component's data is set via ecs_set (can be NULL)
default_valueOptional initial component value, copied on add (can be NULL)
args_sizeSize, in bytes, of the args buffer passed to ecs_add. When non-zero and an add is deferred (issued from a running system), this many bytes are copied and stored so the caller need not keep the args alive. Leave 0 if the component takes no args.
udataUser data passed to callbacks (can be NULL)

Member Data Documentation

◆ on_add_cb

ecs_on_add_fn ecs_comp_desc_t::on_add_cb

◆ on_remove_cb

ecs_on_remove_fn ecs_comp_desc_t::on_remove_cb

◆ on_set_cb

ecs_on_set_fn ecs_comp_desc_t::on_set_cb

◆ default_value

void* ecs_comp_desc_t::default_value

◆ args_size

size_t ecs_comp_desc_t::args_size

◆ udata

void* ecs_comp_desc_t::udata

The documentation for this struct was generated from the following file: