Fix LoadContext
docs. (#19610)
"add_labeled_asset" (add `Asset`) should be "add_loaded_labeled_asset" (add `LoadedAsset`).
This commit is contained in:
parent
fa449e6267
commit
ef71186d44
@ -344,7 +344,7 @@ impl<'a> LoadContext<'a> {
|
||||
|
||||
/// Begins a new labeled asset load. Use the returned [`LoadContext`] to load
|
||||
/// dependencies for the new asset and call [`LoadContext::finish`] to finalize the asset load.
|
||||
/// When finished, make sure you call [`LoadContext::add_labeled_asset`] to add the results back to the parent
|
||||
/// When finished, make sure you call [`LoadContext::add_loaded_labeled_asset`] to add the results back to the parent
|
||||
/// context.
|
||||
/// Prefer [`LoadContext::labeled_asset_scope`] when possible, which will automatically add
|
||||
/// the labeled [`LoadContext`] back to the parent context.
|
||||
@ -360,7 +360,7 @@ impl<'a> LoadContext<'a> {
|
||||
/// # let load_context: LoadContext = panic!();
|
||||
/// let mut handles = Vec::new();
|
||||
/// for i in 0..2 {
|
||||
/// let mut labeled = load_context.begin_labeled_asset();
|
||||
/// let labeled = load_context.begin_labeled_asset();
|
||||
/// handles.push(std::thread::spawn(move || {
|
||||
/// (i.to_string(), labeled.finish(Image::default()))
|
||||
/// }));
|
||||
@ -385,7 +385,7 @@ impl<'a> LoadContext<'a> {
|
||||
/// [`LoadedAsset`], which is registered under the `label` label.
|
||||
///
|
||||
/// This exists to remove the need to manually call [`LoadContext::begin_labeled_asset`] and then manually register the
|
||||
/// result with [`LoadContext::add_labeled_asset`].
|
||||
/// result with [`LoadContext::add_loaded_labeled_asset`].
|
||||
///
|
||||
/// See [`AssetPath`] for more on labeled assets.
|
||||
pub fn labeled_asset_scope<A: Asset, E>(
|
||||
|
Loading…
Reference in New Issue
Block a user