From cc9ed52ea7f72449215f13710fcb6370d02d9ac8 Mon Sep 17 00:00:00 2001 From: Zicklag Date: Thu, 28 Jan 2021 16:14:50 -0600 Subject: [PATCH] Update Scene Example to Use scn.ron File (#1339) --- .../{load_scene_example.scn => load_scene_example.scn.ron} | 0 crates/bevy_scene/src/scene_loader.rs | 2 +- examples/scene/scene.rs | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename assets/scenes/{load_scene_example.scn => load_scene_example.scn.ron} (100%) diff --git a/assets/scenes/load_scene_example.scn b/assets/scenes/load_scene_example.scn.ron similarity index 100% rename from assets/scenes/load_scene_example.scn rename to assets/scenes/load_scene_example.scn.ron diff --git a/crates/bevy_scene/src/scene_loader.rs b/crates/bevy_scene/src/scene_loader.rs index 4ff76330e12d9..78f2942bd4fb6 100644 --- a/crates/bevy_scene/src/scene_loader.rs +++ b/crates/bevy_scene/src/scene_loader.rs @@ -38,6 +38,6 @@ impl AssetLoader for SceneLoader { } fn extensions(&self) -> &[&str] { - &["scn"] + &["scn", "scn.ron"] } } diff --git a/examples/scene/scene.rs b/examples/scene/scene.rs index 23b3262ce2fd5..811a778c0d813 100644 --- a/examples/scene/scene.rs +++ b/examples/scene/scene.rs @@ -49,7 +49,7 @@ impl FromResources for ComponentB { fn load_scene_system(asset_server: Res, mut scene_spawner: ResMut) { // Scenes are loaded just like any other asset. - let scene_handle: Handle = asset_server.load("scenes/load_scene_example.scn"); + let scene_handle: Handle = 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.