Struct amethyst_assets::HotReloadStrategy [−][src]
pub struct HotReloadStrategy { /* fields omitted */ }
An ECS resource which allows to configure hot reloading.
Examples
let mut world = World::new(); // Assets will be reloaded every two seconds (in case they changed) world.add_resource(HotReloadStrategy::every(2));
Methods
impl HotReloadStrategy
[src]
impl HotReloadStrategy
pub fn every(n: u8) -> Self
[src]
pub fn every(n: u8) -> Self
Causes hot reloads every n
seconds.
pub fn when_triggered() -> Self
[src]
pub fn when_triggered() -> Self
This allows to use trigger
for hot reloading.
pub fn never() -> Self
[src]
pub fn never() -> Self
Never do any hot-reloading.
pub fn trigger(&mut self)
[src]
pub fn trigger(&mut self)
The frame after calling this, all changed assets will be reloaded.
Doesn't do anything if the strategy wasn't created with when_triggered
.
Trait Implementations
impl Clone for HotReloadStrategy
[src]
impl Clone for HotReloadStrategy
fn clone(&self) -> HotReloadStrategy
[src]
fn clone(&self) -> HotReloadStrategy
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Default for HotReloadStrategy
[src]
impl Default for HotReloadStrategy
Auto Trait Implementations
impl Send for HotReloadStrategy
impl Send for HotReloadStrategy
impl Sync for HotReloadStrategy
impl Sync for HotReloadStrategy