Commit Graph

4 Commits

Author SHA1 Message Date
Mira ae2fcc0353 Resource hooks & immutable resources (#24164)
# Objective

Enables the resource derive macro to specify the attributes for
- hooks (fixes #24159)
- immutability (fixes #24166)

Also fixes `resource_scope` overwriting change ticks and a few related
doc comments.

## Showcase

```rust
#[derive(Resource)]
#[component(immutable)]
#[component(on_insert = update_level, on_discard = update_level)]
struct Level(i32);
```
2026-05-08 13:33:09 +00:00
Willem c981ecd53b Do not use FixedUpdate on breakout (#23709)
# Objective

The aim is to simplify the example somewhat. This also removes the
jitter that some experience when running the example.

Fixes #14239
Fixes #2349

## Solution

Use `Update` instead of `FixedUpdate` schedule.
 
## Testing
```sh
cargo run --example breakout
```
and 

```sh
cargo run --features bevy_debug_stepping --example breakout
```
2026-04-07 20:53:27 +00:00
Carter Anderson 535cf401cc Reframe old "scene" terminology as "world serialization" (#23630)
Part 2 of #23619 

In **Bevy 0.19** we are landing a subset of Bevy's Next Generation Scene
system (often known as BSN), which now lives in the `bevy_scene` /
`bevy::scene` crate. However the old `bevy_scene` system still needs to
stick around for a bit longer, as it provides some features that Bevy's
Next Generation Scene system doesn't (yet!):

1. It is not _yet_ possible to write a World _to_ BSN, so the old system
is still necessary for "round trip World serialization".
2. The GLTF scene loader has not yet been ported to BSN, so the old
system is still necessary to spawn GLTF scenes in Bevy.

For this reason, we have renamed the old `bevy_scene` crate to
`bevy_world_serialization`. If you were referencing `bevy_scene::*` or
`bevy::scene::*` types, rename those paths to
`bevy_world_serialization::*` and `bevy::world_serialization::*`
respectively.

Additionally, to avoid confusion / conflicts with the new scene system,
all "scene" terminology / types have been reframed as "world
serialization":

- `Scene` -> `WorldAsset` (as this was always just a World wrapper)
- `SceneRoot` -> `WorldAssetRoot`
- `DynamicScene` -> `DynamicWorld`
    - `DynamicScene::from_scene` -> `DynamicWorld::from_world_asset`
- `DynamicSceneBuilder` -> `DynamicWorldBuilder`
- `DynamicSceneRoot` -> `DynamicWorldRoot`
- `SceneInstanceReady` -> `WorldInstanceReady`
- `SceneLoader` -> `WorldAssetLoader`
- `ScenePlugin` -> `WorldSerializationPlugin`
- `SceneRootTemplate` -> `WorldAssetRootTemplate`
- `SceneSpawner` -> `WorldInstanceSpawner`
- `SceneFilter` -> `WorldFilter`
- `SceneLoaderError` -> `WorldAssetLoaderError`
- `SceneSpawnError` -> `WorldInstanceSpawnError`

Note that I went with `bevy_world_serialization` over
`bevy_ecs_serialization`, as that is what all of the internal features
described themselves as. I think it is both more specific and does a
better job of making itself decoupled from `bevy_ecs` proper.
2026-04-04 00:31:47 +00:00
Talin 24661940b4 Rename examples/games to examples/showcase (#23375)
# Objective

- Rename the `examples/games` directory to `examples/showcase`. The
"showcase" category is used for examples that are more comprehensive and
full-featured than most, but which are not necessarily games.
2026-03-16 07:03:31 +00:00