mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
bb968f41bc
# 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 ), ), }, ), }, ) ``` |
||
---|---|---|
.. | ||
load_scene_example.scn.ron |