bevy/examples/ecs
François 5622d56be1 Use plugin setup for resource only used at setup time (#6360)
# Objective

- Build on #6336 for more plugin configurations

## Solution

- `LogSettings`, `ImageSettings` and `DefaultTaskPoolOptions` are now plugins settings rather than resources

---

## Changelog

- `LogSettings` plugin settings have been move to `LogPlugin`, `ImageSettings` to `ImagePlugin` and `DefaultTaskPoolOptions` to `CorePlugin`

## Migration Guide

The `LogSettings` settings have been moved from a resource to `LogPlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(LogSettings {
    level: Level::DEBUG,
    filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".to_string(),
  })
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(LogPlugin {
    level: Level::DEBUG,
    filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".to_string(),
}))
```


The `ImageSettings` settings have been moved from a resource to `ImagePlugin` configuration:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(ImageSettings::default_nearest())
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
```


The `DefaultTaskPoolOptions` settings have been moved from a resource to `CorePlugin::task_pool_options`:

```rust
// Old (Bevy 0.8)
app
  .insert_resource(DefaultTaskPoolOptions::with_num_threads(4))
  .add_plugins(DefaultPlugins)

// New (Bevy 0.9)
app.add_plugins(DefaultPlugins.set(CorePlugin {
  task_pool_options: TaskPoolOptions::with_num_threads(4),
}))
```
2022-10-25 22:19:34 +00:00
..
component_change_detection.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
custom_query_param.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
ecs_guide.rs Exclusive Systems Now Implement System. Flexible Exclusive System Params (#6083) 2022-09-26 23:57:07 +00:00
event.rs Replace the bool argument of Timer with TimerMode (#6247) 2022-10-17 13:47:01 +00:00
fixed_timestep.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
generic_system.rs Replace the bool argument of Timer with TimerMode (#6247) 2022-10-17 13:47:01 +00:00
hierarchy.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
iter_combinations.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
parallel_query.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
removal_detection.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
startup_system.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
state.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
system_closure.rs Use plugin setup for resource only used at setup time (#6360) 2022-10-25 22:19:34 +00:00
system_param.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
system_piping.rs Rename system chaining to system piping (#6230) 2022-10-11 15:21:12 +00:00
system_sets.rs Add global time scaling (#5752) 2022-10-22 18:52:29 +00:00
timers.rs Replace the bool argument of Timer with TimerMode (#6247) 2022-10-17 13:47:01 +00:00