mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Update Scene Example to Use scn.ron File (#1339)
This commit is contained in:
parent
5146112f5f
commit
cc9ed52ea7
3 changed files with 2 additions and 2 deletions
|
@ -38,6 +38,6 @@ impl AssetLoader for SceneLoader {
|
|||
}
|
||||
|
||||
fn extensions(&self) -> &[&str] {
|
||||
&["scn"]
|
||||
&["scn", "scn.ron"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ impl FromResources for ComponentB {
|
|||
|
||||
fn load_scene_system(asset_server: Res<AssetServer>, mut scene_spawner: ResMut<SceneSpawner>) {
|
||||
// Scenes are loaded just like any other asset.
|
||||
let scene_handle: Handle<DynamicScene> = asset_server.load("scenes/load_scene_example.scn");
|
||||
let scene_handle: Handle<DynamicScene> = asset_server.load("scenes/load_scene_example.scn.ron");
|
||||
|
||||
// SceneSpawner can "spawn" scenes. "Spawning" a scene creates a new instance of the scene in the World with new entity ids.
|
||||
// This guarantees that it will not overwrite existing entities.
|
||||
|
|
Loading…
Reference in a new issue