bevy_scriptum 0.11.0

Plugin for Bevy engine that allows you to write some of your game or application logic in a scripting language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use bevy::prelude::*;

/// A component that represents a script.
#[derive(Component)]
pub struct Script<A: Asset> {
    pub script: Handle<A>,
}

impl<A: Asset> Script<A> {
    /// Create a new script component from a handle to a [Script] obtained using [AssetServer].
    pub fn new(script: Handle<A>) -> Self {
        Self { script }
    }
}