Skip to main content

spawn_mesh_asset

Function spawn_mesh_asset 

Source
pub fn spawn_mesh_asset(
    world: &mut GameWorld,
    uuid: AssetUUID,
    point: [f32; 3],
    label: &str,
) -> EntityId
Expand description

Spawns an entity that references a mesh asset by UUID at a world point, attaching a default surface material so it renders immediately. The asset_resolver_system loads the mesh from the MeshRef::Asset next tick. Returns the new entity. label is used to derive a readable Name.