Skip to main content

component_add_batch_impl

Function component_add_batch_impl 

Source
pub unsafe fn component_add_batch_impl(
    context_id: GoudContextId,
    entity_ids: *const u64,
    count: u32,
    type_id_hash: u64,
    data_ptr: *const u8,
    component_size: usize,
) -> u32
Expand description

Adds the same component type to multiple entities in a batch.

§Safety

  • entity_ids must point to valid memory with count u64 values
  • data_ptr must point to count * component_size bytes of data
  • component_size must match the registered component type size