Nav Mesh Obstacle Carving Move Threshold#
Navigation / Nav Mesh Obstacle / Nav Mesh Obstacle Carving Move Threshold
Description#
Compares the Carving Move Threshold property of Nav Mesh Obstacle component to another value
Parameters#
| Name | Description |
|---|---|
| Nav Mesh Obstacle | |
| Compare | |
| Value |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.AI;
namespace VisualScript.Runtime
{
[Title("Nav Mesh Obstacle Carving Move Threshold")]
[Category("Navigation/Nav Mesh Obstacle/Carving Move Threshold")]
[Description("Compares the Carving Move Threshold property of Nav Mesh Obstacle component to another value")]
[Image(typeof(IconNavmeshObstacle), ColorTheme.Type.Red)]
[Keywords("Navigation, NavMesh, AI, Carve, Block")]
[Parameter("Nav Mesh Obstacle")]
[Parameter("Compare")]
[Parameter("Value")]
[Serializable]
public class GenConditionNumber_NavMeshObstacle_CheckCarvingMoveThreshold : Condition
{
[SerializeField] private GetGameObject m_NavMeshObstacle = new GetGameObject(
new GenTypeGameObject_NavMeshObstacle()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetNumber m_Value = new GetNumber();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Carving Move Threshold");
return $"{this.m_NavMeshObstacle} {member} {this.m_Compare} {this.m_Value}";
}
protected override bool Run(Args args)
{
NavMeshObstacle component = this.m_NavMeshObstacle.Get<NavMeshObstacle>(args);
if (component == null) return false;
return this.m_Compare.Compare(component.carvingMoveThreshold, (float) this.m_Value.Get(args));
}
}
}