 70d9dfdc48
			
		
	
	
		70d9dfdc48
		
			
		
	
	
	
	
		
			
			# Objective Fixes #12900 ## Solution Added comment to example indicating that additional audio formats are supported when the feature is added. --------- Co-authored-by: James Liu <contact@jamessliu.com>
		
			
				
	
	
		
			19 lines
		
	
	
		
			510 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			510 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //! This example illustrates how to load and play an audio file.
 | |
| //! For loading additional audio formats, you can enable the corresponding feature for that audio format.
 | |
| 
 | |
| use bevy::prelude::*;
 | |
| 
 | |
| fn main() {
 | |
|     App::new()
 | |
|         .add_plugins(DefaultPlugins)
 | |
|         .add_systems(Startup, setup)
 | |
|         .run();
 | |
| }
 | |
| 
 | |
| fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
 | |
|     commands.spawn(AudioBundle {
 | |
|         source: asset_server.load("sounds/Windless Slopes.ogg"),
 | |
|         ..default()
 | |
|     });
 | |
| }
 |