pub struct PrefabEntry {Show 17 fields
pub name: String,
pub kind: PrefabKind,
pub position: [f32; 3],
pub rotation_deg: [f32; 3],
pub scale: [f32; 3],
pub model: String,
pub mesh: String,
pub material: String,
pub texture: String,
pub parent: String,
pub collider: Option<PropCollider>,
pub interactable: bool,
pub pickup: bool,
pub light_color: [f32; 3],
pub light_intensity: f32,
pub light_range: f32,
pub prefab: String,
}Expand description
One entry in a Prefab’s props list. The fields consulted depend on
kind: a prop uses the render / collision / transform fields, a
point_light uses the light_* fields, and a prefab uses prefab. Names
in model / mesh / material / texture / parent / prefab are
unresolved references to other assets, resolved when the entry expands.
Fields§
§name: StringEntry name; the expanded asset is named <instance>_<name>.
kind: PrefabKindWhich asset this entry expands into.
position: [f32; 3]Local position relative to the instance transform.
rotation_deg: [f32; 3]Local rotation, Euler degrees [pitch, yaw, roll], YXZ order.
scale: [f32; 3]Local scale.
model: Stringprop: Model name.
mesh: Stringprop: Mesh / ProceduralMesh name.
material: Stringprop: Material name.
texture: Stringprop: Texture name (older path; material takes priority).
parent: Stringprop: parent asset name for the expanded prop.
collider: Option<PropCollider>prop: optional collision shape for the expanded prop.
interactable: boolprop: whether the expanded prop is interactable.
pickup: boolprop: whether the expanded prop is a pickup.
light_color: [f32; 3]point_light: linear-space RGB colour.
light_intensity: f32point_light: intensity multiplier.
light_range: f32point_light: maximum reach in world units.
prefab: Stringprefab: name of another Prefab to expand at this entry’s transform.
Trait Implementations§
Source§impl Clone for PrefabEntry
impl Clone for PrefabEntry
Source§fn clone(&self) -> PrefabEntry
fn clone(&self) -> PrefabEntry
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 PrefabEntry
impl Debug for PrefabEntry
Source§impl Default for PrefabEntry
impl Default for PrefabEntry
Source§impl<'de> Deserialize<'de> for PrefabEntrywhere
PrefabEntry: Default,
impl<'de> Deserialize<'de> for PrefabEntrywhere
PrefabEntry: 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 PrefabEntry
impl RefUnwindSafe for PrefabEntry
impl Send for PrefabEntry
impl Sync for PrefabEntry
impl Unpin for PrefabEntry
impl UnsafeUnpin for PrefabEntry
impl UnwindSafe for PrefabEntry
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