bevy/assets
Gino Valente bb968f41bc bevy_scene: Serialize entities to map (#6416)
# Objective

Entities are unique, however, this is not reflected in the scene format. Currently, entities are stored in a list where a user could inadvertently create a duplicate of the same entity. 

## Solution

Switch from the list representation to a map representation for entities.

---

## Changelog

* The `entities` field in the scene format is now a map of entity ID to entity data

## Migration Guide

The scene format now stores its collection of entities in a map rather than a list:

```rust
// OLD
(
  entities: [
    (
      entity: 12,
      components: {
        "bevy_transform::components::transform::Transform": (
          translation: (
            x: 0.0,
            y: 0.0,
            z: 0.0
          ),
          rotation: (0.0, 0.0, 0.0, 1.0),
          scale: (
            x: 1.0,
            y: 1.0,
            z: 1.0
          ),
        ),
      },
    ),
  ],
)

// NEW
(
  entities: {
    12: (
      components: {
        "bevy_transform::components::transform::Transform": (
          translation: (
            x: 0.0,
            y: 0.0,
            z: 0.0
          ),
          rotation: (0.0, 0.0, 0.0, 1.0),
          scale: (
            x: 1.0,
            y: 1.0,
            z: 1.0
          ),
        ),
      },
    ),
  },
)
```
2022-10-31 16:35:18 +00:00
..
android-res/mipmap-mdpi android example polish (#845) 2020-11-11 16:31:16 -08:00
branding Minor Dark/Light Logo Tweak (#4051) 2022-02-27 02:09:42 +00:00
data Asset system rework and GLTF scene loading (#693) 2020-10-18 13:48:15 -07:00
fonts Add the license for the FiraMono font (#3589) 2022-05-06 19:29:43 +00:00
models animation player (#4375) 2022-04-02 22:36:02 +00:00
scenes bevy_scene: Serialize entities to map (#6416) 2022-10-31 16:35:18 +00:00
shaders add globals to mesh view bind group (#5409) 2022-09-28 04:20:27 +00:00
sounds Add simple collision sound to breakout (#4331) 2022-04-14 20:20:38 +00:00
textures Support array / cubemap / cubemap array textures in KTX2 (#5325) 2022-07-30 07:02:58 +00:00