---
tags:
    - "Navigation, NavMesh, AI, Carve, Block"
---

# Nav Mesh Obstacle Carving

[Navigation](../index.md) / [Nav Mesh Obstacle](index.md) / **Nav Mesh Obstacle Carving**

## Description

Compares the Carving property of Nav Mesh Obstacle component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Nav Mesh Obstacle |  |

## Code

```cs
// <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")]
    [Category("Navigation/Nav Mesh Obstacle/Carving")]
    [Description("Compares the Carving 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")]

    [Serializable]
    public class GenConditionBool_NavMeshObstacle_CheckCarving : Condition
    {
        [SerializeField] private GetGameObject m_NavMeshObstacle = new GetGameObject(
            new GenTypeGameObject_NavMeshObstacle()
        );

        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Carving");
            return $"{this.m_NavMeshObstacle} {member}";
        }

        protected override bool Run(Args args)
        {
            NavMeshObstacle component = this.m_NavMeshObstacle.Get<NavMeshObstacle>(args);
            if (component == null) return false;

            return component.carving;
        }
    }
}
```

