aboutsummaryrefslogtreecommitdiff
path: root/src/preload/events.rs
blob: a6f9d167c20c7448c63baeeca1023c671d29153e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::path::PathBuf;

use bevy::prelude::*;

/// Event used to trigger preload callbacks after the asset file has been pre-processed to extract
/// the payload
#[derive(Debug, Event, Clone)]
pub struct DirworldPreload {
    /// Entity with the `[DirworldEntity]` component corresponding to the entity being preloaded
    pub entity: Entity,
    /// The data portion of the file after being pre-processed
    pub data: Option<Vec<u8>>,
}

#[derive(Debug, Event, Clone)]
pub struct DirworldPreloadBegin {
    pub old_path: PathBuf,
    pub path: PathBuf,
}