16 lines
340 B
Rust
16 lines
340 B
Rust
//! Deferred editor command execution (palette, BRP bridge).
|
|
|
|
use bevy::prelude::*;
|
|
|
|
#[derive(Resource, Default)]
|
|
pub struct PendingEditorCommands {
|
|
pub queue: Vec<String>,
|
|
}
|
|
|
|
pub fn queue_editor_command(world: &mut World, name: String) {
|
|
world
|
|
.resource_mut::<PendingEditorCommands>()
|
|
.queue
|
|
.push(name);
|
|
}
|