mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-26 08:38:10 +00:00
fix headless failure
This commit is contained in:
@@ -20,7 +20,7 @@ use space_editor::{
|
||||
};
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::material::short_material::ShortMaterial;
|
||||
use crate::{material::short_material::ShortMaterial, StudioMode};
|
||||
use crate::{
|
||||
interaction::Selection,
|
||||
wasm::{self, StaticBuffer, WasmMessageBuffer},
|
||||
@@ -30,6 +30,12 @@ pub struct InspectorPlugin;
|
||||
|
||||
impl Plugin for InspectorPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
if let Some(state) = app.world.get_resource::<StudioMode>() {
|
||||
if *state == StudioMode::Headless {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
app.init_resource::<EntityDescription>();
|
||||
app.add_event::<UpdateEntityDescription>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user