summaryrefslogtreecommitdiff
path: root/engine/src/asset.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/asset.rs')
-rw-r--r--engine/src/asset.rs65
1 files changed, 0 insertions, 65 deletions
diff --git a/engine/src/asset.rs b/engine/src/asset.rs
index 7aacc5b..6b27928 100644
--- a/engine/src/asset.rs
+++ b/engine/src/asset.rs
@@ -669,54 +669,6 @@ pub struct Submitter<'path>
impl Submitter<'_>
{
- pub fn submit_load_other<'label, AssetT>(
- &self,
- label: impl Into<Label<'label>>,
- ) -> Handle<AssetT>
- where
- AssetT: Asset,
- {
- let label = label.into();
-
- let _ = self.import_work_msg_sender.send(ImportWorkMessage::Load {
- do_load: |assets, label, _asset_settings| {
- let _ = assets.load::<AssetT>(label);
- },
- label: label.to_owned(),
- asset_settings: None,
- });
-
- Handle::new(LabelHash::new(&label))
- }
-
- pub fn submit_load_other_with_settings<'label, AssetT, AssetSettings>(
- &self,
- label: impl Into<Label<'label>>,
- asset_settings: AssetSettings,
- ) -> Handle<AssetT>
- where
- AssetT: Asset,
- AssetSettings: Send + Sync + Debug + 'static,
- {
- let label = label.into();
-
- let _ = self.import_work_msg_sender.send(ImportWorkMessage::Load {
- do_load: |assets, label, asset_settings| {
- let asset_settings = *asset_settings
- .expect("Not possible")
- .downcast::<AssetSettings>()
- .expect("Not possible");
-
- let _ = assets
- .load_with_settings::<AssetT, AssetSettings>(label, asset_settings);
- },
- label: label.to_owned(),
- asset_settings: Some(Box::new(asset_settings)),
- });
-
- Handle::new(LabelHash::new(&label))
- }
-
pub fn submit_store<AssetT>(&self, asset: AssetT) -> Handle<AssetT>
where
AssetT: Asset,
@@ -1004,16 +956,6 @@ fn add_received_assets(mut assets: Single<Assets>, mut events: Single<Events>)
ImportWorkMessage::Store { do_store, label, asset } => {
do_store(assets, label, asset);
}
- ImportWorkMessage::Load { do_load, label, asset_settings } => {
- do_load(
- assets,
- Label {
- path: label.path.as_path().into(),
- name: label.name.as_deref().map(Into::into),
- },
- asset_settings,
- );
- }
}
}
}
@@ -1049,13 +991,6 @@ enum ImportWorkMessage
label: LabelOwned,
asset: Box<dyn Any + Send + Sync>,
},
-
- Load
- {
- do_load: fn(&Assets, Label<'_>, Option<Box<dyn Any + Send + Sync>>),
- label: LabelOwned,
- asset_settings: Option<Box<dyn Any + Send + Sync>>,
- },
}
#[derive(Debug)]