add unity behavior tree package & examples

add start of own implementation of a behavior tree
This commit is contained in:
2025-04-23 12:33:28 +02:00
parent 8a01366c35
commit d9fb5ee7bc
19 changed files with 232 additions and 17 deletions
+28
View File
@@ -0,0 +1,28 @@
using System;
using UnityEngine;
namespace DefaultNamespace.BehaviorTree
{
public class Tree : MonoBehaviour
{
private Node _rootNode;
private void OnEnable()
{
if (_rootNode == null) return;
_rootNode.Start();
}
private void Update()
{
if (_rootNode == null) return;
_rootNode.Update();
}
private void OnDisable()
{
if (_rootNode == null) return;
_rootNode.End();
}
}
}