-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
for rerecast_id in changed_rerecast_ids {
let Some(landmass_id) = mapping.get(rerecast_id) else {
// The mapping has been cleaned up since we got the event OR this mesh
// never had a mapping.
continue;
};
let Some(rerecast_mesh) = rerecast_meshes.remove(rerecast_id) else { // <------here
// We always send an event the first time the conversion is created in
// case this asset exists. But it is also perfectly valid for this asset
// to not exist and still be loading.
continue;
};
let landmass_mesh =
convert_rerecast_navmesh_to_landmass_navmesh(&rerecast_mesh);
let landmass_mesh = match landmass_mesh.validate() {
Ok(landmass_mesh) => landmass_meI noticed a potential issue in the convert_changed_rerecast_meshes_to_landmass system where rerecast_meshes.remove(rerecast_id) is used to get the rerecast mesh for conversion. This seems problematic as it permanently removes the asset from the Assets storage.
Questions:
- Is this remove() call intentional, or should it be get()?
- Are there any specific reasons why the original rerecast mesh needs to be removed after conversion?
- Could this cause issues when multiple entities reference the same rerecast mesh?
Metadata
Metadata
Assignees
Labels
No labels