Skip to content

Commit f397270

Browse files
committed
ability to run the editor with graphics debugging turned on
1 parent f11587d commit f397270

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

editor-standalone/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ struct Args {
3333
/// List of scenes to load
3434
#[arg(short, long)]
3535
scenes: Option<Vec<String>>,
36+
37+
#[arg(short, long)]
38+
named_objects: bool,
3639
}
3740

3841
fn main() {
@@ -48,6 +51,7 @@ fn main() {
4851
.iter()
4952
.map(Into::into)
5053
.collect(),
54+
named_objects: args.named_objects,
5155
})
5256
} else {
5357
None

editor/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ pub struct StartupData {
362362

363363
/// A scene to load at the editor start. If it is empty, no scene will be loaded.
364364
pub scenes: Vec<PathBuf>,
365+
366+
pub named_objects: bool,
365367
}
366368

367369
#[derive(Debug)]
@@ -791,7 +793,10 @@ impl Editor {
791793
vsync: true,
792794
msaa_sample_count: Some(4),
793795
graphics_server_constructor: Default::default(),
794-
named_objects: false,
796+
named_objects: startup_data
797+
.as_ref()
798+
.map(|d| d.named_objects)
799+
.unwrap_or_default(),
795800
};
796801

797802
let serialization_context = Arc::new(SerializationContext::new());

0 commit comments

Comments
 (0)