fix headless failure

This commit is contained in:
rewin
2024-04-02 22:14:53 +03:00
parent 1d3c309c20
commit 6500031f6b
5 changed files with 66 additions and 39 deletions
+7 -1
View File
@@ -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>();