pub struct PrefabConfig {
pub max_prefabs: usize,
pub min_spacing: usize,
pub allow_rotation: bool,
pub allow_mirroring: bool,
pub weighted_selection: bool,
pub placement_mode: PrefabPlacementMode,
pub tags: Option<Vec<String>>,
}Expand description
Configuration for prefab placement.
Fields§
§max_prefabs: usizeMaximum prefabs to place. Default: 3.
min_spacing: usizeMinimum distance between prefabs. Default: 5.
allow_rotation: boolAllow rotating prefabs. Default: true.
allow_mirroring: boolAllow mirroring prefabs. Default: false.
weighted_selection: boolUse weight-based selection. Default: true.
placement_mode: PrefabPlacementModeHow prefabs interact with existing tiles. Default: Overwrite.
Filter prefabs by tags. Default: None (use all).
Trait Implementations§
Source§impl Clone for PrefabConfig
impl Clone for PrefabConfig
Source§fn clone(&self) -> PrefabConfig
fn clone(&self) -> PrefabConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrefabConfig
impl Debug for PrefabConfig
Source§impl Default for PrefabConfig
impl Default for PrefabConfig
Source§impl<'de> Deserialize<'de> for PrefabConfig
impl<'de> Deserialize<'de> for PrefabConfig
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 PrefabConfig
impl RefUnwindSafe for PrefabConfig
impl Send for PrefabConfig
impl Sync for PrefabConfig
impl Unpin for PrefabConfig
impl UnwindSafe for PrefabConfig
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