Skip to main content

component_add_impl

Function component_add_impl 

Source
pub unsafe fn component_add_impl(
    context_id: GoudContextId,
    entity_id: GoudEntityId,
    type_id_hash: u64,
    data_ptr: *const u8,
    data_size: usize,
) -> GoudResult
Expand description

Adds a component to an entity.

§Safety

  • data_ptr must point to valid component data
  • data_size must match the registered component size