Skip to main content

pack_asset_drag

Function pack_asset_drag 

Source
pub(crate) fn pack_asset_drag(index: u32, epoch: u64) -> u64
Expand description

Packs an asset-list index plus a stamp of the epoch it was read at.

The index alone is not enough: it points into EditorState::asset_entries, which hot_reload::pump rebuilds whenever a file appears, disappears or is renamed on disk. Without the stamp, a rescan mid-drag silently retargets the drop at whatever now occupies that slot.