Stingray.BehaviourTreeGraphGen 1.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet tool install --global Stingray.BehaviourTreeGraphGen --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Stingray.BehaviourTreeGraphGen --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Stingray.BehaviourTreeGraphGen&version=1.0.1
                    
nuke :add-package Stingray.BehaviourTreeGraphGen --version 1.0.1
                    

Stingray Behavior Tree Graph Generator

A command-line tool to generate Mermaid flowcharts from C# Behavior Tree definitions.

Overview

This tool analyzes C# source code to find BehaviorTree instantiations and visualizes their structure. It is designed to work with the Stingray.BehaviorTree library.

Usage

Run from Source

You can run the tool directly using the dotnet run command:

dotnet run --project Tools/Stingray.BehaviourTreeGraphGen -- --input <path-to-source> --output <path-to-output-file>

Arguments:

  • -i, --input: Poly to the directory containing the C# files to analyze. The tool searches recursively.
  • -o, --output: Path to the output Mermaid (.mmd) file.

Example

To run the tool against the included example:

dotnet run --project Tools/Stingray.BehaviourTreeGraphGen -- -i Tools/Stingray.BehaviourTreeGraphGen/Example -o behavior_tree.mmd

Output

The tool generates a Mermaid graph definition. You can view it using:

  • Mermaid Live Editor
  • VS Code extensions (e.g., Markdown Preview Mermaid Support)
  • Github Markdown preview

Graph Legend

  • {? Selector}: A Selector node (OR logic).
  • [-> Sequence]: A Sequence node (AND logic).
  • ((Condition)): A leaf node representing a condition check.
  • [Action]: A leaf node representing an action.
graph TD
    5858cb3c-1edd-43ed-884c-f64008b17d23{"? Guard Root"}
    5858cb3c-1edd-43ed-884c-f64008b17d23 --> c755b72f-a07b-4f02-9ebc-08d39481881b
    c755b72f-a07b-4f02-9ebc-08d39481881b["-> Self Preservation"]
    c755b72f-a07b-4f02-9ebc-08d39481881b --> ff59cec2-3308-4ad4-bc27-eb14fc061b52
    ff59cec2-3308-4ad4-bc27-eb14fc061b52(("Is Low Health"))
    c755b72f-a07b-4f02-9ebc-08d39481881b --> c2865eef-c0af-4edf-a7e9-2042a2538671
    c2865eef-c0af-4edf-a7e9-2042a2538671["Retreat"]
    5858cb3c-1edd-43ed-884c-f64008b17d23 --> 95aa599e-730a-41fe-a992-10120f756f90
    95aa599e-730a-41fe-a992-10120f756f90["-> Combat"]
    95aa599e-730a-41fe-a992-10120f756f90 --> 7546c00a-48ca-4008-8785-cb281600b9e1
    7546c00a-48ca-4008-8785-cb281600b9e1(("Enemy In Sight"))
    95aa599e-730a-41fe-a992-10120f756f90 --> e23c565e-8e94-4e7a-9015-e71eba94b160
    e23c565e-8e94-4e7a-9015-e71eba94b160["Attack"]
    5858cb3c-1edd-43ed-884c-f64008b17d23 --> e9e114ad-fe71-4d1c-b5fc-2ee3128c2470
    e9e114ad-fe71-4d1c-b5fc-2ee3128c2470["-> Patrol"]
    e9e114ad-fe71-4d1c-b5fc-2ee3128c2470 --> fe7969c9-9da3-4af1-9ce6-eea35f679d87
    fe7969c9-9da3-4af1-9ce6-eea35f679d87["Move to Next Waypoint"]
    e9e114ad-fe71-4d1c-b5fc-2ee3128c2470 --> e04a4647-63c3-4782-8b62-3a1a7a9f6d2a
    e04a4647-63c3-4782-8b62-3a1a7a9f6d2a["Wait"]
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated