Skip to main content

payload_is_entity

Function payload_is_entity 

Source
pub(crate) fn payload_is_entity(payload: u64) -> bool
Expand description

true when payload is not one of the asset-browser’s dedicated drag tags (the type-agnostic asset-tile tag). Lets receivers disambiguate scene-tree entity payloads from asset-tile payloads on the same dnd_take_drop_payload channel.

The check is conservative: any payload whose top 32 bits don’t match a known tag is assumed to be a packed EntityId. Entity generations are tiny u32s (start at 1) so this can’t collide with the ASCII-encoded tag constants in crate::panels::asset_browser.