add namesh package and samples

This commit is contained in:
Alexander Borisov
2026-04-07 02:23:21 +03:00
parent 21c9d59f05
commit 1a466a5fc6
224 changed files with 25917 additions and 6 deletions
@@ -0,0 +1,18 @@
using UnityEngine;
namespace Unity.AI.Navigation.Samples
{
/// <summary>
/// Destroy owning GameObject if any collider with a specific tag is trespassing
/// </summary>
public class DestroyOnTrigger : MonoBehaviour
{
public string m_Tag = "Player";
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == m_Tag)
Destroy(gameObject);
}
}
}