pub unsafe fn insert_by_id<T: Send + 'static>(
component_id: ComponentId,
value: T,
mode: InsertMode,
) -> impl EntityCommand
Expand description
An EntityCommand
that adds a dynamic component to an entity.
ยงSafety
ComponentId
must be from the same world as the target entity.T
must have the same layout as the one passed duringcomponent_id
creation.