https://github.com/bentlemon/dog-knight-basic-behaviour-tree
Just a showcase of a behaviour tree implementation in Unity!
https://github.com/bentlemon/dog-knight-basic-behaviour-tree
ai behaviour-tree game-development gamedev unity unity3d
Last synced: about 2 months ago
JSON representation
Just a showcase of a behaviour tree implementation in Unity!
- Host: GitHub
- URL: https://github.com/bentlemon/dog-knight-basic-behaviour-tree
- Owner: bentlemon
- Created: 2024-12-08T15:49:17.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-27T13:01:02.000Z (5 months ago)
- Last Synced: 2025-04-02T15:13:21.133Z (about 2 months ago)
- Topics: ai, behaviour-tree, game-development, gamedev, unity, unity3d
- Language: C#
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dog Knight! U・ᴥ・U
## Description
A simple behaviour tree implementation in Unity (2022) with patrol and attack!What he does:
* Random patrol pattern with random waiting time
* Detect enemies & walks to them
* Slays his enemies!!### Code
Originally uploaded to Gitlab, only asset code is provided here!!## Tree setup for Dog Knight
Dog knight has a simple tree setup that is the following:
```
Node root = new Selector(new List
{
new Sequence(new List {
new EnemyInFOVRange(transform),
new GoToTargetAction(transform),
new EnemyInAttackRange(transform),
new AttackAction(transform)
}),
new PatrolAction(transform),
});
```## Demo Video
Click the following image to see the result! :)[](https://www.youtube.com/watch?v=BLsSRWvRAQ4)
## 3D Assets used
- https://assetstore.unity.com/packages/3d/environments/stylized-hand-painted-dungeon-free-173934
- https://assetstore.unity.com/packages/3d/characters/animals/dog-knight-pbr-polyart-135227
- https://assetstore.unity.com/packages/3d/characters/animals/insects/fantasy-spider-236418
- https://assetstore.unity.com/packages/3d/props/crate-31462
- https://assetstore.unity.com/packages/3d/props/barrels-32975