pub struct EngineDefaults {
pub hud: bool,
pub debug_hud: bool,
pub sky: bool,
pub story_pause_menu: bool,
pub loading_overlay: bool,
pub physics_config: bool,
}Expand description
Opts a world out of individual engine-injected defaults.
A world is completed at build time with standard assets it does not declare
itself: the DebugHud with its chip TextLabels
and font, the StatHud and its chips when the world declares a
MainMenu, the PhysicsConfig a world with
physics content simulates on, and, when an
EnvironmentMap is present, the sky mesh that displays
it. Declaring the same asset yourself replaces the injected one; declaring
EngineDefaults with a flag set to false removes it entirely.
The build records every injected asset in world-lock.json; copy an entry
from there (or from cn explain <name>) into world.jsonl to override it.
EngineDefaults {
debug_hud: false,
sky: false,
..Default::default()
};Fields§
§hud: bool§debug_hud: boolInject the DebugHud with its chip labels when the world
declares no DebugHud.
sky: boolInject the sky mesh (a skybox ProceduralMesh,
Material, and Prop) when the world has an
EnvironmentMap but no skybox mesh. Disable to use an
EnvironmentMap for image-based lighting only, with the background
left to clear_color or your own geometry.
Inject an Escape-toggled pause MainMenu when the world
plays a Story but declares no MainMenu: Resume, Save, Load,
a trimmed Settings screen, and Quit to the story’s title. Disable to
leave a story with no pause menu, or declare your own MainMenu to
replace it.
loading_overlay: boolInject the LoadingOverlay with its screen, backdrop,
progress bar, and label when the world declares Scenes and a
StreamingConfig but no LoadingOverlay. Disable to
jump between scenes with no loading screen while their content streams
in.
physics_config: boolInject a PhysicsConfig with the engine’s own values
when the world has physics content – a RigidBody, a
PropBody, a TriggerVolume, or a
SkinnedMesh with a capsule – but declares no
PhysicsConfig. Physics runs on those values either way; the injected
asset is what makes them visible in world-lock.json and editable,
spawn_headroom above all. Disable to leave them implicit.
Trait Implementations§
Source§impl Authored for EngineDefaults
impl Authored for EngineDefaults
impl BuildOnlyAsset for EngineDefaults
Source§impl Clone for EngineDefaults
impl Clone for EngineDefaults
Source§fn clone(&self) -> EngineDefaults
fn clone(&self) -> EngineDefaults
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EngineDefaults
impl Debug for EngineDefaults
Source§impl Default for EngineDefaults
impl Default for EngineDefaults
Source§impl<'de> Deserialize<'de> for EngineDefaultswhere
EngineDefaults: Default,
impl<'de> Deserialize<'de> for EngineDefaultswhere
EngineDefaults: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for EngineDefaults
impl RefUnwindSafe for EngineDefaults
impl Send for EngineDefaults
impl Sync for EngineDefaults
impl Unpin for EngineDefaults
impl UnsafeUnpin for EngineDefaults
impl UnwindSafe for EngineDefaults
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more