Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Scene Example to Use .scn.ron File #1339

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/bevy_scene/src/scene_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ impl AssetLoader for SceneLoader {
}

fn extensions(&self) -> &[&str] {
&["scn"]
&["scn", "scn.ron"]
}
}
2 changes: 1 addition & 1 deletion examples/scene/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down