Struct amethyst_assets::Loader [] [src]

pub struct Loader { /* fields omitted */ }

The asset loader, holding the contexts, the default (directory) store and a reference to the ThreadPool.

Methods

impl Loader
[src]

Creates a new asset loader, initializing the directory store with the given path.

Adds a store which can later be loaded from by supplying the same name to load_from.

Registers an asset and inserts a context into the map.

Like load_from, but doesn't ask the cache for the asset.

Loads an asset with a given format from the default (directory) store. If you want to load from a custom source instead, use load_from.

The actual work is done on a worker thread, thus this method immediately returns a future.

Loads an asset with a given id and format from a custom store. The actual work is done on a worker thread, thus this method immediately returns a future.

Panics

Panics if the asset wasn't registered.