This repository has been archived on 2025-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
Net.Like.Xue.Tokyo/Assets/Plugins/ParadoxNotion/NodeCanvas/Tasks/Conditions/GameObject/HasComponent.cs

17 lines
350 B
C#

using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Conditions
{
[Category("GameObject")]
public class HasComponent<T> : ConditionTask<Transform> where T : Component
{
protected override bool OnCheck() {
return agent.GetComponent<T>() != null;
}
}
}