NavMeshBuildSettings

Struct NavMeshBuildSettings 

Source
pub struct NavMeshBuildSettings {
Show 18 fields pub agentClimb: f32, pub agentHeight: f32, pub agentRadius: f32, pub agentSlope: f32, pub agentTypeID: i32, pub cellSize: f32, pub ledgeDropHeight: f32, pub manualCellSize: Enum_bool__i32, pub manualTileSize: Enum_bool__i32, pub maxJumpAcrossDistance: f32, pub minRegionArea: f32, pub tileSize: i32, pub accuratePlacement: Option<Enum_bool__i32>, pub buildHeightMesh: Option<i32>, pub debug: Option<NavMeshBuildDebugSettings>, pub keepTiles: Option<i32>, pub maxJobWorkers: Option<u32>, pub preserveTilesOutsideBounds: Option<i32>,
}
Expand description

NavMeshBuildSettings is a sub class of the Unity engine since version 5.6.0b1. Exert from Unity’s scripting documentation: The NavMeshBuildSettings struct allows you to specify a collection of settings which describe the dimensions and limitations of a particular agent type. You might want to define multiple NavMeshBuildSettings if your game involves characters with large differences in height, width or climbing ability.You can also use this struct to control the precision and granularity of the build process, by setting the voxel and tile sizes. Some of the values are coupled, meaning there are constraints on the values based on other values. For example, it’s not valid for agentClimb to be larger than agentHeight. To help diagnose violations of these rules, a special method ValidationReport can be evaluated.

Fields§

§agentClimb: f32

The maximum vertical step size an agent can take.

§agentHeight: f32

The height of the agent for baking in world units.

§agentRadius: f32

The radius of the agent for baking in world units.

§agentSlope: f32

The maximum slope angle which is walkable (angle in degrees).

§agentTypeID: i32

The agent type ID the NavMesh will be baked for.

§cellSize: f32§ledgeDropHeight: f32

Maximum agent drop height.

§manualCellSize: Enum_bool__i32§manualTileSize: Enum_bool__i32§maxJumpAcrossDistance: f32

Maximum agent jump distance.

§minRegionArea: f32

The approximate minimum area of individual NavMesh regions.

§tileSize: i32

Sets the tile size in voxel units.

§accuratePlacement: Option<Enum_bool__i32>

bool: (5.6.0b1 - 5.6.0b11); i32: (5.6.0f2 - 2022.1.24f1)

§buildHeightMesh: Option<i32>

Enables the creation of additional data needed to determine the height at any position on the NavMesh more accurately. i32: (2022.2.0b1 - 2022.3.2f1)

§debug: Option<NavMeshBuildDebugSettings>

Options for collecting debug data during the build process. NavMeshBuildDebugSettings: (2017.2.0b2 - 2022.3.2f1)

§keepTiles: Option<i32>

i32: (2020.1.0a23 - 2020.1.0a23)

§maxJobWorkers: Option<u32>

The maximum number of worker threads that the build process can utilize when building a NavMesh with these settings. u32: (2020.1.0b1 - 2022.3.2f1)

§preserveTilesOutsideBounds: Option<i32>

i32: (2020.1.0b1 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for NavMeshBuildSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NavMeshBuildSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for NavMeshBuildSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,