IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/GameObject/FindWithName.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

28 lines
630 B
C#

using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Actions
{
[Category("GameObject")]
public class FindWithName : ActionTask
{
[RequiredField]
public BBParameter<string> gameObjectName;
[BlackboardOnly]
public BBParameter<GameObject> saveAs;
protected override string info {
get { return "Find Object " + gameObjectName + " as " + saveAs; }
}
protected override void OnExecute() {
saveAs.value = GameObject.Find(gameObjectName.value);
EndAction();
}
}
}