From a483e9d4fb13c9ab079b9618f6aad448ed555776 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 18:19:51 +0200 Subject: [PATCH 1/9] added package.json --- package.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..b3de024 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "com.baltin.fbt", + "version": "0.5.0", + "displayName": "Functional Behavior Tree", + "description": "Functional Behavior Tree Design Pattern Implementation", + "unity": "2019.4.37f1", + "keywords": ["unity", "tools", "library", "behavior tree", "ai", "npc", "async", "task"], + "author": { + "name": "Dmitry Baltin", + "email": "baltin.dmitry@gmail.com", + "url": "https://github.com/dmitrybaltin/FunctionalBT" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/dmitrybaltin/UnitaskFBT.git" + }, + "bugs": { + "url": "https://github.com/dmitrybaltin/FunctionalBT/issues" + }, + "homepage": "https://github.com/dmitrybaltin/FunctionalBT" +} From 421440cf2cfb652747413b6b11f8debd12550664 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 18:33:58 +0200 Subject: [PATCH 2/9] fixed unity version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3de024..78b763a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.5.0", "displayName": "Functional Behavior Tree", "description": "Functional Behavior Tree Design Pattern Implementation", - "unity": "2019.4.37f1", + "unity": "2019.3.4", "keywords": ["unity", "tools", "library", "behavior tree", "ai", "npc", "async", "task"], "author": { "name": "Dmitry Baltin", From 486664d7439a4af2c05fe680282c0ef90e2f2222 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 18:34:57 +0200 Subject: [PATCH 3/9] fixed unity version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78b763a..1eb8daa 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.5.0", "displayName": "Functional Behavior Tree", "description": "Functional Behavior Tree Design Pattern Implementation", - "unity": "2019.3.4", + "unity": "2019.3", "keywords": ["unity", "tools", "library", "behavior tree", "ai", "npc", "async", "task"], "author": { "name": "Dmitry Baltin", From 656cb4c7a77ef676cf7a3ca9966d5a12486edec9 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 19:17:24 +0200 Subject: [PATCH 4/9] fixed metafiles --- examples.meta => package.json.meta | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename examples.meta => package.json.meta (57%) diff --git a/examples.meta b/package.json.meta similarity index 57% rename from examples.meta rename to package.json.meta index 9b5c15c..fee86f5 100644 --- a/examples.meta +++ b/package.json.meta @@ -1,7 +1,6 @@ fileFormatVersion: 2 -guid: 1b524db720a29d540b36884c84648ae6 -folderAsset: yes -DefaultImporter: +guid: df9c8d238876a2e40869675d1ca34d9c +TextScriptImporter: externalObjects: {} userData: assetBundleName: From a3226baaeb3a7dd28d6decb3bc3e5e9b75aa02db Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 19:18:06 +0200 Subject: [PATCH 5/9] folder renamed --- {Scripts => Runtime}/ExtendedFBT.cs | 0 {Scripts => Runtime}/ExtendedFBT.cs.meta | 0 {Scripts => Runtime}/LightestFBT.cs | 0 {Scripts => Runtime}/LightestFBT.cs.meta | 0 {Scripts => Runtime}/ParallelFbtNodes.cs | 0 {Scripts => Runtime}/ParallelFbtNodes.cs.meta | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {Scripts => Runtime}/ExtendedFBT.cs (100%) rename {Scripts => Runtime}/ExtendedFBT.cs.meta (100%) rename {Scripts => Runtime}/LightestFBT.cs (100%) rename {Scripts => Runtime}/LightestFBT.cs.meta (100%) rename {Scripts => Runtime}/ParallelFbtNodes.cs (100%) rename {Scripts => Runtime}/ParallelFbtNodes.cs.meta (100%) diff --git a/Scripts/ExtendedFBT.cs b/Runtime/ExtendedFBT.cs similarity index 100% rename from Scripts/ExtendedFBT.cs rename to Runtime/ExtendedFBT.cs diff --git a/Scripts/ExtendedFBT.cs.meta b/Runtime/ExtendedFBT.cs.meta similarity index 100% rename from Scripts/ExtendedFBT.cs.meta rename to Runtime/ExtendedFBT.cs.meta diff --git a/Scripts/LightestFBT.cs b/Runtime/LightestFBT.cs similarity index 100% rename from Scripts/LightestFBT.cs rename to Runtime/LightestFBT.cs diff --git a/Scripts/LightestFBT.cs.meta b/Runtime/LightestFBT.cs.meta similarity index 100% rename from Scripts/LightestFBT.cs.meta rename to Runtime/LightestFBT.cs.meta diff --git a/Scripts/ParallelFbtNodes.cs b/Runtime/ParallelFbtNodes.cs similarity index 100% rename from Scripts/ParallelFbtNodes.cs rename to Runtime/ParallelFbtNodes.cs diff --git a/Scripts/ParallelFbtNodes.cs.meta b/Runtime/ParallelFbtNodes.cs.meta similarity index 100% rename from Scripts/ParallelFbtNodes.cs.meta rename to Runtime/ParallelFbtNodes.cs.meta From feb157e88cd81cd5300a17cce8886a4cb94448d3 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 19:20:42 +0200 Subject: [PATCH 6/9] fixed metafiles --- Scripts.meta => Runtime.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Scripts.meta => Runtime.meta (77%) diff --git a/Scripts.meta b/Runtime.meta similarity index 77% rename from Scripts.meta rename to Runtime.meta index 71b07c7..0aa7aeb 100644 --- a/Scripts.meta +++ b/Runtime.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 21d28f59ea610ea4f9da9465590f259c +guid: 9c76a58f8ff66314695703daa28d705f folderAsset: yes DefaultImporter: externalObjects: {} From f3b2a4c6ff3e572a682d849288a7f37f8c0fa7c4 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Mon, 25 Aug 2025 19:24:09 +0200 Subject: [PATCH 7/9] fixed package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1eb8daa..126fd7d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.baltin.fbt", "version": "0.5.0", - "displayName": "Functional Behavior Tree", + "displayName": "FunctionalBT", "description": "Functional Behavior Tree Design Pattern Implementation", "unity": "2019.3", "keywords": ["unity", "tools", "library", "behavior tree", "ai", "npc", "async", "task"], From 41fea405ded6dd14eea7d60bcc80e2aec587fd2e Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Tue, 26 Aug 2025 18:01:50 +0200 Subject: [PATCH 8/9] removed extra meta files --- {Docs => .docs}/fbt_example.png | Bin {Docs => .docs}/fbt_icon.png | Bin Docs.meta | 8 -- Docs/fbt_example.png.meta | 127 ---------------------------- Docs/fbt_icon.png.meta | 143 -------------------------------- README.md | 4 +- 6 files changed, 2 insertions(+), 280 deletions(-) rename {Docs => .docs}/fbt_example.png (100%) rename {Docs => .docs}/fbt_icon.png (100%) delete mode 100644 Docs.meta delete mode 100644 Docs/fbt_example.png.meta delete mode 100644 Docs/fbt_icon.png.meta diff --git a/Docs/fbt_example.png b/.docs/fbt_example.png similarity index 100% rename from Docs/fbt_example.png rename to .docs/fbt_example.png diff --git a/Docs/fbt_icon.png b/.docs/fbt_icon.png similarity index 100% rename from Docs/fbt_icon.png rename to .docs/fbt_icon.png diff --git a/Docs.meta b/Docs.meta deleted file mode 100644 index ba16a42..0000000 --- a/Docs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1331e3f0f7746cc49a80906e611bf712 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Docs/fbt_example.png.meta b/Docs/fbt_example.png.meta deleted file mode 100644 index 70cc705..0000000 --- a/Docs/fbt_example.png.meta +++ /dev/null @@ -1,127 +0,0 @@ -fileFormatVersion: 2 -guid: 226e435557fbd0b418c876a2a01e3467 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 13 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Android - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Docs/fbt_icon.png.meta b/Docs/fbt_icon.png.meta deleted file mode 100644 index 5753787..0000000 --- a/Docs/fbt_icon.png.meta +++ /dev/null @@ -1,143 +0,0 @@ -fileFormatVersion: 2 -guid: aeb8c6d447aa6414e9cab4b624abda34 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 13 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMipmapLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - cookieLightType: 0 - platformSettings: - - serializedVersion: 4 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: Android - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 4 - buildTarget: WebGL - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - ignorePlatformSupport: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - customData: - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spriteCustomMetadata: - entries: [] - nameFileIdTable: {} - mipmapLimitGroupName: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/README.md b/README.md index fedf8b1..520f76a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![FBT_Logo](Docs/fbt_icon.png) +![FBT_Logo](.docs/fbt_icon.png) # "Functional Behavior Tree" Design Pattern in C# @@ -100,7 +100,7 @@ Key points to note: As shown in the example code, this implementation is extremely simple, zero allocation and fast and focused purely on logic, making it easy to debug. You can set breakpoints on any anonymous delegate or tree node function. When the execution reaches these breakpoints, the debugger will pause correctly, allowing you to inspect the state at that point. Here is an illustration of breakpoints in the code: -![Example of debugging](Docs/fbt_example.png) +![Example of debugging](.docs/fbt_example.png) ## Functional Behavior Tree pattern code for Unity From 204ac46de8e1e3a51acb0bb70598fc386014f685 Mon Sep 17 00:00:00 2001 From: Dmitry Baltin Date: Tue, 26 Aug 2025 18:09:29 +0200 Subject: [PATCH 9/9] try to check version increment when merge to the main branch --- .github/workflows/check-version.yml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/check-version.yml diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml new file mode 100644 index 0000000..6c414a9 --- /dev/null +++ b/.github/workflows/check-version.yml @@ -0,0 +1,32 @@ +name: Check package version + +on: + pull_request: + branches: + - main + - test + +jobs: + check-version: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Get last Git tag + id: tag + run: | + LAST_TAG=$(git describe --tags --abbrev=0 || echo "v0.0.0") + echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV + + - name: Get package.json version + run: | + VERSION=$(grep '"version"' package.json | head -1 | sed -E 's/.*"version": *"([^"]+)".*/\1/') + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Check version increment + run: | + if [ "$VERSION" == "${LAST_TAG#v}" ]; then + echo "Version not incremented! Last tag: $LAST_TAG, package.json: $VERSION" + exit 1 + fi