pub struct Prefab {
pub props: Vec<PrefabEntry>,
}Expand description
A reusable template of Props, PointLights, and nested prefabs.
Placed as a unit at a world-space transform. Add a prefab field to a
Prop to instantiate it; each instance expands into concrete assets
positioned relative to the instance’s transform.
Expanded asset names: <instance_name>_<entry_name> (nested:
<instance>_<outer>_<inner>).
Instantiation: add a prefab field to a Prop. The prop’s other
fields (position, rotation_deg, scale) act as the instance’s world
transform.
Library presets (JSON files in assets/prefabs/):
Fields§
§props: Vec<PrefabEntry>Ordered list of entries. Each is a prop, a point light, or a nested
prefab (selected by kind), placed relative to the instance transform.
Trait Implementations§
impl BuildOnlyAsset for Prefab
Source§impl<'de> Deserialize<'de> for Prefab
impl<'de> Deserialize<'de> for Prefab
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Prefab
impl RefUnwindSafe for Prefab
impl Send for Prefab
impl Sync for Prefab
impl Unpin for Prefab
impl UnsafeUnpin for Prefab
impl UnwindSafe for Prefab
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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