16 lines
		
	
	
	
		
			407 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			407 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| use bevy::{prelude::*};
 | |
| use bevy_scriptum::{prelude::*, Script};
 | |
| 
 | |
| fn main() {
 | |
|     App::new()
 | |
|         .add_plugins(DefaultPlugins)
 | |
|         .add_plugin(ScriptingPlugin::default())
 | |
|         .add_startup_system(startup)
 | |
|         .run();
 | |
| }
 | |
| 
 | |
| fn startup(mut commands: Commands, assets_server: Res<AssetServer>) {
 | |
|     commands.spawn(Script::new(
 | |
|         assets_server.load("examples/entity_variable.rhai"),
 | |
|     ));
 | |
| }
 |