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/.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 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 diff --git a/Docs.meta b/Runtime.meta similarity index 77% rename from Docs.meta rename to Runtime.meta index ba16a42..0aa7aeb 100644 --- a/Docs.meta +++ b/Runtime.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1331e3f0f7746cc49a80906e611bf712 +guid: 9c76a58f8ff66314695703daa28d705f folderAsset: yes DefaultImporter: externalObjects: {} 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 diff --git a/Scripts.meta b/Scripts.meta deleted file mode 100644 index 71b07c7..0000000 --- a/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 21d28f59ea610ea4f9da9465590f259c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 0000000..126fd7d --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "com.baltin.fbt", + "version": "0.5.0", + "displayName": "FunctionalBT", + "description": "Functional Behavior Tree Design Pattern Implementation", + "unity": "2019.3", + "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" +} 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: