bevy_commandify 0.3.0

A macro for creating bevy commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bevy_commandify::*;
use bevy::prelude::*;
use bevy::ecs::system::CommandQueue;

#[command(no_trait)]
fn foo(world: &mut World) { }

/// Test that direct trait method fails
fn main() {
    let mut world = World::new();

    let mut queue = CommandQueue::default();
    let mut commands = Commands::new(&mut queue, &mut world);

    commands.foo();

    queue.apply(&mut world);
}