├── .gitignore ├── Assembly-CSharp-Editor.csproj ├── Assembly-CSharp.csproj ├── Assets ├── BehaviorTreeDesigner.meta └── BehaviorTreeDesigner │ ├── Examples.meta │ ├── Examples │ ├── Animations.meta │ ├── Animations │ │ ├── DefaultAVatar@PlantNTurn90.fbx │ │ ├── DefaultAVatar@PlantNTurn90.fbx.meta │ │ ├── DefaultAvatar.fbm.meta │ │ ├── DefaultAvatar.fbm │ │ │ ├── body normal.tga │ │ │ ├── body normal.tga.meta │ │ │ ├── body_color_map.tga │ │ │ ├── body_color_map.tga.meta │ │ │ ├── body_specular_map.tga │ │ │ ├── body_specular_map.tga.meta │ │ │ ├── eyes_color_map.tga │ │ │ ├── eyes_color_map.tga.meta │ │ │ ├── eyes_specular_map.tga │ │ │ ├── eyes_specular_map.tga.meta │ │ │ ├── face normal.tga │ │ │ ├── face normal.tga.meta │ │ │ ├── face_color_map.tga │ │ │ ├── face_color_map.tga.meta │ │ │ ├── face_specular_map.tga │ │ │ └── face_specular_map.tga.meta │ │ ├── DefaultAvatar.fbx │ │ ├── DefaultAvatar.fbx.meta │ │ ├── DefaultAvatar@Idle_Neutral.fbx │ │ ├── DefaultAvatar@Idle_Neutral.fbx.meta │ │ ├── DefaultAvatar@PlantNTurn135.fbx │ │ ├── DefaultAvatar@PlantNTurn135.fbx.meta │ │ ├── DefaultAvatar@PlantNTurn180.fbx │ │ ├── DefaultAvatar@PlantNTurn180.fbx.meta │ │ ├── DefaultAvatar@RunForwardTurnRight_NtrlMedium.fbx │ │ ├── DefaultAvatar@RunForwardTurnRight_NtrlMedium.fbx.meta │ │ ├── DefaultAvatar@RunForwardTurnRight_NtrlWide.fbx │ │ ├── DefaultAvatar@RunForwardTurnRight_NtrlWide.fbx.meta │ │ ├── DefaultAvatar@RunForward_NtrlFaceFwd.fbx │ │ ├── DefaultAvatar@RunForward_NtrlFaceFwd.fbx.meta │ │ ├── DefaultAvatar@TurnOnSpot.fbx │ │ ├── DefaultAvatar@TurnOnSpot.fbx.meta │ │ ├── DefaultAvatar@WalkForwardTurnRight_NtrlMedium.fbx │ │ ├── DefaultAvatar@WalkForwardTurnRight_NtrlMedium.fbx.meta │ │ ├── DefaultAvatar@WalkForwardTurnRight_NtrlShort.fbx │ │ ├── DefaultAvatar@WalkForwardTurnRight_NtrlShort.fbx.meta │ │ ├── DefaultAvatar@WalkForwardTurnRight_NtrlWide.fbx │ │ ├── DefaultAvatar@WalkForwardTurnRight_NtrlWide.fbx.meta │ │ ├── DefaultAvatar@WalkForward_NtrlFaceFwd.fbx │ │ ├── DefaultAvatar@WalkForward_NtrlFaceFwd.fbx.meta │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── body_color_map.mat │ │ │ ├── body_color_map.mat.meta │ │ │ ├── eyes_color_map.mat │ │ │ ├── eyes_color_map.mat.meta │ │ │ ├── face_color_map.mat │ │ │ └── face_color_map.mat.meta │ │ ├── Textures.meta │ │ └── Textures │ │ │ ├── body normal.png │ │ │ ├── body normal.png.meta │ │ │ ├── body_color_map.png │ │ │ ├── body_color_map.png.meta │ │ │ ├── eyes_color_map.png │ │ │ ├── eyes_color_map.png.meta │ │ │ ├── eyes_specular_map.png │ │ │ ├── eyes_specular_map.png.meta │ │ │ ├── face normal.png │ │ │ ├── face normal.png.meta │ │ │ ├── face_color_map.png │ │ │ └── face_color_map.png.meta │ ├── BehaviorTrees.meta │ ├── BehaviorTrees │ │ ├── Agent.asset │ │ ├── Agent.asset.meta │ │ ├── Enemy.asset │ │ ├── Enemy.asset.meta │ │ ├── Patrol.asset │ │ └── Patrol.asset.meta │ ├── Locomotion.meta │ ├── Locomotion │ │ ├── Locomotion.controller │ │ └── Locomotion.controller.meta │ ├── Materials.meta │ ├── Materials │ │ ├── Bullet.mat │ │ ├── Bullet.mat.meta │ │ ├── Enemy.mat │ │ ├── Enemy.mat.meta │ │ ├── Floor.mat │ │ └── Floor.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Enemy.prefab │ │ └── Enemy.prefab.meta │ ├── Resources.meta │ ├── Resources │ │ ├── Bullet.prefab │ │ └── Bullet.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Example.meta │ │ ├── Example.unity │ │ ├── Example.unity.meta │ │ └── Example │ │ │ ├── NavMesh.asset │ │ │ └── NavMesh.asset.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── Agent.cs │ │ ├── Agent.cs.meta │ │ ├── Bullet.cs │ │ ├── Bullet.cs.meta │ │ ├── Enemy.cs │ │ ├── Enemy.cs.meta │ │ ├── Locomotion.cs │ │ ├── Locomotion.cs.meta │ │ ├── Nodes.meta │ │ └── Nodes │ │ ├── Shoot.cs │ │ └── Shoot.cs.meta │ ├── Node_Editor.meta │ ├── Node_Editor │ ├── Editor.meta │ ├── Editor │ │ ├── Node_Editor.meta │ │ └── Node_Editor │ │ │ ├── LastSession.asset │ │ │ ├── LastSession.asset.meta │ │ │ ├── NodeEditorWindow.cs │ │ │ └── NodeEditorWindow.cs.meta │ ├── Node_Editor.meta │ └── Node_Editor │ │ ├── Framework.meta │ │ ├── Framework │ │ ├── CalculationCanvasType.cs │ │ ├── CalculationCanvasType.cs.meta │ │ ├── ConnectionTypes.cs │ │ ├── ConnectionTypes.cs.meta │ │ ├── DefaultNodeCalculator.cs │ │ ├── DefaultNodeCalculator.cs.meta │ │ ├── Node.cs │ │ ├── Node.cs.meta │ │ ├── NodeCanvas.cs │ │ ├── NodeCanvas.cs.meta │ │ ├── NodeCanvasManager.cs │ │ ├── NodeCanvasManager.cs.meta │ │ ├── NodeCanvasSceneSave.cs │ │ ├── NodeCanvasSceneSave.cs.meta │ │ ├── NodeCanvasTraversal.cs │ │ ├── NodeCanvasTraversal.cs.meta │ │ ├── NodeEditor.cs │ │ ├── NodeEditor.cs.meta │ │ ├── NodeEditorCallbackReceiver.cs │ │ ├── NodeEditorCallbackReceiver.cs.meta │ │ ├── NodeEditorGUI.cs │ │ ├── NodeEditorGUI.cs.meta │ │ ├── NodeEditorInputControls.cs │ │ ├── NodeEditorInputControls.cs.meta │ │ ├── NodeEditorInputSystem.cs │ │ ├── NodeEditorInputSystem.cs.meta │ │ ├── NodeEditorSaveManager.cs │ │ ├── NodeEditorSaveManager.cs.meta │ │ ├── NodeEditorState.cs │ │ ├── NodeEditorState.cs.meta │ │ ├── NodeEditorUserCache.cs │ │ ├── NodeEditorUserCache.cs.meta │ │ ├── NodeGroup.cs │ │ ├── NodeGroup.cs.meta │ │ ├── NodeInput.cs │ │ ├── NodeInput.cs.meta │ │ ├── NodeKnob.cs │ │ ├── NodeKnob.cs.meta │ │ ├── NodeOutput.cs │ │ ├── NodeOutput.cs.meta │ │ ├── NodeTypes.cs │ │ └── NodeTypes.cs.meta │ │ ├── Resources.meta │ │ ├── Resources │ │ ├── LineShader.shader │ │ ├── LineShader.shader.meta │ │ ├── Textures.meta │ │ └── Textures │ │ │ ├── AALine.png │ │ │ ├── AALine.png.meta │ │ │ ├── Icon_Dark.png │ │ │ ├── Icon_Dark.png.meta │ │ │ ├── Icon_Light.png │ │ │ ├── Icon_Light.png.meta │ │ │ ├── In_Knob.png │ │ │ ├── In_Knob.png.meta │ │ │ ├── Knobs.xcf │ │ │ ├── Knobs.xcf.meta │ │ │ ├── NE_Box.png │ │ │ ├── NE_Box.png.meta │ │ │ ├── NE_Button.png │ │ │ ├── NE_Button.png.meta │ │ │ ├── NE_GUI.xcf │ │ │ ├── NE_GUI.xcf.meta │ │ │ ├── Out_Knob.png │ │ │ ├── Out_Knob.png.meta │ │ │ ├── background.png │ │ │ ├── background.png.meta │ │ │ ├── expandRight.png │ │ │ └── expandRight.png.meta │ │ ├── Utilities.meta │ │ └── Utilities │ │ ├── EditorLoadingControl.cs │ │ ├── EditorLoadingControl.cs.meta │ │ ├── GUI.meta │ │ ├── GUI │ │ ├── GUIScaleUtility.cs │ │ ├── GUIScaleUtility.cs.meta │ │ ├── OverlayGUI.cs │ │ ├── OverlayGUI.cs.meta │ │ ├── RTEditorGUI.cs │ │ └── RTEditorGUI.cs.meta │ │ ├── ResourceManager.cs │ │ ├── ResourceManager.cs.meta │ │ ├── link.xml │ │ └── link.xml.meta │ ├── Resources.meta │ ├── Resources │ ├── BehavorIcons.meta │ └── BehavorIcons │ │ ├── Inverter.png │ │ ├── Inverter.png.meta │ │ ├── Logger.png │ │ ├── Logger.png.meta │ │ ├── Parallel.png │ │ ├── Parallel.png.meta │ │ ├── Repeater.png │ │ ├── Repeater.png.meta │ │ ├── Selector.png │ │ ├── Selector.png.meta │ │ ├── Sequence.png │ │ └── Sequence.png.meta │ ├── Scripts.meta │ └── Scripts │ ├── BehaviorBlackboard.cs │ ├── BehaviorBlackboard.cs.meta │ ├── BehaviorCanvas.cs │ ├── BehaviorCanvas.cs.meta │ ├── BehaviorManager.cs │ ├── BehaviorManager.cs.meta │ ├── ColliderHelper.cs │ ├── ColliderHelper.cs.meta │ ├── Nodes.meta │ ├── Nodes │ ├── Actions.meta │ ├── Actions │ │ ├── Animation.meta │ │ ├── Animation │ │ │ ├── SetBool.cs │ │ │ ├── SetBool.cs.meta │ │ │ ├── SetFloat.cs │ │ │ ├── SetFloat.cs.meta │ │ │ ├── SetInteger.cs │ │ │ ├── SetInteger.cs.meta │ │ │ ├── SetTrigger.cs │ │ │ └── SetTrigger.cs.meta │ │ ├── Entries.meta │ │ ├── Entries │ │ │ ├── HasEntry.cs │ │ │ ├── HasEntry.cs.meta │ │ │ ├── LayerToEntry.cs │ │ │ ├── LayerToEntry.cs.meta │ │ │ ├── SetEntry.cs │ │ │ ├── SetEntry.cs.meta │ │ │ ├── TagToEntry.cs │ │ │ ├── TagToEntry.cs.meta │ │ │ ├── TriggerToEntry.cs │ │ │ └── TriggerToEntry.cs.meta │ │ ├── GetNextWaypoint.cs │ │ ├── GetNextWaypoint.cs.meta │ │ ├── MoveToTarget.cs │ │ └── MoveToTarget.cs.meta │ ├── BaseBehaviorNode.cs │ ├── BaseBehaviorNode.cs.meta │ ├── Composites.meta │ ├── Composites │ │ ├── Parallel.cs │ │ ├── Parallel.cs.meta │ │ ├── Random.cs │ │ ├── Random.cs.meta │ │ ├── Selector.cs │ │ ├── Selector.cs.meta │ │ ├── Sequence.cs │ │ └── Sequence.cs.meta │ ├── Debug.meta │ ├── Debug │ │ ├── FixedValue.cs │ │ ├── FixedValue.cs.meta │ │ ├── Logger.cs │ │ ├── Logger.cs.meta │ │ ├── ReadEntry.cs │ │ └── ReadEntry.cs.meta │ ├── Decorators.meta │ ├── Decorators │ │ ├── Inverter.cs │ │ ├── Inverter.cs.meta │ │ ├── Repeater.cs │ │ ├── Repeater.cs.meta │ │ ├── Wait.cs │ │ └── Wait.cs.meta │ ├── Root.cs │ ├── Root.cs.meta │ ├── Subtree.cs │ ├── Subtree.cs.meta │ ├── Template.cs │ └── Template.cs.meta │ ├── Waypoint.meta │ └── Waypoint │ ├── Editor.meta │ ├── Editor │ ├── PlaceWaypoints.cs │ ├── PlaceWaypoints.cs.meta │ ├── WaypointsEditor.cs │ └── WaypointsEditor.cs.meta │ ├── SetWaypoint.cs │ ├── SetWaypoint.cs.meta │ ├── Waypoint.cs │ ├── Waypoint.cs.meta │ ├── Waypoints.cs │ └── Waypoints.cs.meta ├── BehaviorTreeDesigner.sln ├── DOCUMENTATION.md ├── IncludedNodes.md ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset ├── README.md └── Resources.meta /.gitignore: -------------------------------------------------------------------------------- 1 | /*.meta 2 | /Node_Editor/Editor/Node_Editor/LastSession.asset 3 | /Node_Editor/Editor/Node_Editor/LastSession.asset.meta 4 | Library 5 | Temp 6 | Assembly-CSharp.csproj 7 | Assembly-CSharp-Editor.csproj 8 | BehaviorTreeDesigner.sln 9 | obj 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c2d93c047afa36469d6cb9d1600f7fe 3 | folderAsset: yes 4 | timeCreated: 1506715168 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07ba1838a009e5d4ba6f1d954e19ed25 3 | folderAsset: yes 4 | timeCreated: 1506714633 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 827eba476e0f44396a5882c1b0b8e80a 3 | folderAsset: yes 4 | timeCreated: 1436468226 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAVatar@PlantNTurn90.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAVatar@PlantNTurn90.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ccefef83f48d6542b91c478321e73d2 3 | folderAsset: yes 4 | timeCreated: 1484534515 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body normal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body normal.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body normal.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c10807f509d25c4d87ccd7bebdcd704 3 | timeCreated: 1484534518 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body_color_map.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body_color_map.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body_color_map.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fa5cb33be83fc74fa08c3c30fa6fc80 3 | timeCreated: 1484534517 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body_specular_map.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body_specular_map.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/body_specular_map.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d615453939351314dbdbe0690a1cc0cc 3 | timeCreated: 1484534520 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/eyes_color_map.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/eyes_color_map.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/eyes_color_map.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2162bec3c3bf7564d8a8591587902b68 3 | timeCreated: 1484534515 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/eyes_specular_map.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/eyes_specular_map.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/eyes_specular_map.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b03293bb176a4ef4db7f559705da5ed2 3 | timeCreated: 1484534518 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face normal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face normal.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face normal.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64302997f2e5154438acdf2f3c0bc2fd 3 | timeCreated: 1484534517 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face_color_map.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face_color_map.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face_color_map.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2d8a4cdaf840e2438c9488d22a992c5 3 | timeCreated: 1484534519 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face_specular_map.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face_specular_map.tga -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbm/face_specular_map.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3566dc039e4a5d4418c7518fd620d172 3 | timeCreated: 1484534516 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: [] 65 | spritePackingTag: 66 | userData: 67 | assetBundleName: 68 | assetBundleVariant: 69 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@Idle_Neutral.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@Idle_Neutral.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@PlantNTurn135.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@PlantNTurn135.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@PlantNTurn180.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@PlantNTurn180.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@RunForwardTurnRight_NtrlMedium.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@RunForwardTurnRight_NtrlMedium.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@RunForwardTurnRight_NtrlWide.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@RunForwardTurnRight_NtrlWide.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@RunForward_NtrlFaceFwd.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@RunForward_NtrlFaceFwd.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@TurnOnSpot.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@TurnOnSpot.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForwardTurnRight_NtrlMedium.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForwardTurnRight_NtrlMedium.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForwardTurnRight_NtrlShort.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForwardTurnRight_NtrlShort.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForwardTurnRight_NtrlWide.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForwardTurnRight_NtrlWide.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForward_NtrlFaceFwd.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/DefaultAvatar@WalkForward_NtrlFaceFwd.fbx -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 153f0f15838484a50b155ae7c77a63aa 3 | folderAsset: yes 4 | timeCreated: 1436468226 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials/body_color_map.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Materials/body_color_map.mat -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials/body_color_map.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce37bf81a56517f40ac733d2425a0cde 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials/eyes_color_map.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Materials/eyes_color_map.mat -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials/eyes_color_map.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 814caf612769bc946bf6b20774b51804 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials/face_color_map.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Materials/face_color_map.mat -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Materials/face_color_map.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4a3fee76242626489dd28595f7cc308 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 568a746cbc9df4cba97e6d28b0cdd977 3 | folderAsset: yes 4 | timeCreated: 1436468226 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/body normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Textures/body normal.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/body normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41e268a90fa45c44abbe32ef892be9e3 3 | timeCreated: 1484534575 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/body_color_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Textures/body_color_map.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/body_color_map.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a12123c61ac6ee49972ca223610877c 3 | timeCreated: 1484534202 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/eyes_color_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Textures/eyes_color_map.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/eyes_color_map.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 595b504323025b2489550d45d72dcf22 3 | timeCreated: 1484534200 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/eyes_specular_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Textures/eyes_specular_map.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/eyes_specular_map.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebd1e364bf4e1c745b2ddbb05bc5dd3d 3 | timeCreated: 1484534205 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/face normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Textures/face normal.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/face normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81ea7580f1be00f4f9b2dc65fca80337 3 | timeCreated: 1484534575 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/face_color_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Animations/Textures/face_color_map.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Animations/Textures/face_color_map.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c6c5145d58d29d44b0a00d128f2d9c8 3 | timeCreated: 1484534201 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d666263c48a37d40a2909b2cb7d10e9 3 | folderAsset: yes 4 | timeCreated: 1486789074 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Agent.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Agent.asset -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Agent.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e037cd371834234439e2c5a40ba6ca0f 3 | timeCreated: 1486757973 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Enemy.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Enemy.asset -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Enemy.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89d32713c14939b439e1be3465183e49 3 | timeCreated: 1486786227 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Patrol.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Patrol.asset -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/BehaviorTrees/Patrol.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 243958d49ab78e14d8d02fa578705550 3 | timeCreated: 1506788765 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Locomotion.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abb1d2a47be00c14f995c393183bc09c 3 | folderAsset: yes 4 | timeCreated: 1484533875 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Locomotion/Locomotion.controller: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Locomotion/Locomotion.controller -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Locomotion/Locomotion.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29ed5a05bb8ad434a993329a6d8879a8 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d98936b35a5d5254bb47caead3ecd5b6 3 | folderAsset: yes 4 | timeCreated: 1484540915 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials/Bullet.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Materials/Bullet.mat -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials/Bullet.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ace59766065a9947b5f70f36c10ddf3 3 | timeCreated: 1484540985 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials/Enemy.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Materials/Enemy.mat -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials/Enemy.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0be2e4e83e176b948b25efc0b2654fd0 3 | timeCreated: 1484540910 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials/Floor.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Materials/Floor.mat -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Materials/Floor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2329054e9bef98e4a8f2a2e62c5c5c00 3 | timeCreated: 1484541027 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f6b59f95918d9b48a0a380b4356c427 3 | folderAsset: yes 4 | timeCreated: 1484540952 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Prefabs/Enemy.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Prefabs/Enemy.prefab -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Prefabs/Enemy.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 678f801bbb998fc4081796afc7afdce4 3 | timeCreated: 1484617952 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ff99d2c31d13034facca6fb61f9aa1c 3 | folderAsset: yes 4 | timeCreated: 1484539413 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Resources/Bullet.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Resources/Bullet.prefab -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Resources/Bullet.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29aec40153679e44197e3e1426a48366 3 | timeCreated: 1484617650 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d23b0e5151c6f5d47ae05696ffa17f26 3 | folderAsset: yes 4 | timeCreated: 1484531643 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scenes/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 686f6f200f28de64296be8594ed1ab4f 3 | folderAsset: yes 4 | timeCreated: 1484535472 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scenes/Example.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Scenes/Example.unity -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scenes/Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48bc0fbabd109f94bb4ba980a7f6a853 3 | timeCreated: 1484617320 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scenes/Example/NavMesh.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Examples/Scenes/Example/NavMesh.asset -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scenes/Example/NavMesh.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8717fc44fe86012449c63135437540f9 3 | timeCreated: 1484618693 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 765c94fc3596b41759fce6cfdae645be 3 | folderAsset: yes 4 | timeCreated: 1436468226 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Agent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | #if UNITY_5_5_OR_NEWER 4 | using UnityEngine.AI; 5 | #endif 6 | 7 | namespace BehavorTreeDesigner.Example 8 | { 9 | public class Agent : MonoBehaviour 10 | { 11 | protected NavMeshAgent agent; 12 | protected Animator animator; 13 | protected Locomotion locomotion; 14 | 15 | private void Start () 16 | { 17 | agent = GetComponent(); 18 | agent.updateRotation = false; 19 | 20 | animator = GetComponent(); 21 | locomotion = new Locomotion(animator); 22 | } 23 | 24 | protected void SetupAgentLocomotion() 25 | { 26 | if (AgentDone()) 27 | { 28 | locomotion.Do(0, 0); 29 | } 30 | else 31 | { 32 | float speed = agent.desiredVelocity.magnitude; 33 | Vector3 velocity = Quaternion.Inverse(transform.rotation) * agent.desiredVelocity; 34 | float angle = Mathf.Atan2(velocity.x, velocity.z) * 180.0f / 3.14159f; 35 | locomotion.Do(speed, angle); 36 | } 37 | } 38 | 39 | private void OnAnimatorMove() 40 | { 41 | agent.velocity = animator.deltaPosition / Time.deltaTime; 42 | transform.rotation = animator.rootRotation; 43 | } 44 | 45 | protected bool AgentDone() 46 | { 47 | return !agent.pathPending && AgentStopping(); 48 | } 49 | 50 | protected bool AgentStopping() 51 | { 52 | return agent.remainingDistance <= agent.stoppingDistance; 53 | } 54 | 55 | private void Update () 56 | { 57 | SetupAgentLocomotion(); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Agent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b2fdf6ccca87134c91b2951064caaad 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Bullet.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace BehavorTreeDesigner.Example 6 | { 7 | public class Bullet : MonoBehaviour 8 | { 9 | private void Start () 10 | { 11 | Destroy(gameObject, 2); 12 | } 13 | 14 | private void Update() 15 | { 16 | transform.Translate(Vector3.forward * 10 * Time.deltaTime, Space.Self); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Bullet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2b9cd91c20fedf40ac51767fd792634 3 | timeCreated: 1484546820 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Enemy.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace BehavorTreeDesigner.Example 6 | { 7 | public class Enemy : MonoBehaviour 8 | { 9 | private int health = 3; 10 | private float spawnDelay = 0.1f; 11 | private float spawnDelayTimer = 0f; 12 | 13 | private void OnTriggerEnter(Collider collider) 14 | { 15 | if(collider.name == "Bullet(Clone)" && Time.time >= spawnDelayTimer) 16 | { 17 | health -= 1; 18 | if(health == 0) 19 | { 20 | Destroy(gameObject); 21 | } 22 | Destroy(collider.gameObject); 23 | spawnDelayTimer = Time.time + spawnDelay; 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Enemy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 580ad9f2da93632498ef22bb69390c9e 3 | timeCreated: 1484580578 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Locomotion.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace BehavorTreeDesigner.Example 5 | { 6 | public class Locomotion 7 | { 8 | private Animator m_Animator = null; 9 | private int m_SpeedId = 0; 10 | private int m_AgularSpeedId = 0; 11 | private int m_DirectionId = 0; 12 | 13 | public float m_SpeedDampTime = 0.1f; 14 | public float m_AnguarSpeedDampTime = 0.25f; 15 | public float m_DirectionResponseTime = 0.2f; 16 | 17 | public Locomotion(Animator animator) 18 | { 19 | m_Animator = animator; 20 | 21 | m_SpeedId = Animator.StringToHash("Speed"); 22 | m_AgularSpeedId = Animator.StringToHash("AngularSpeed"); 23 | m_DirectionId = Animator.StringToHash("Direction"); 24 | } 25 | 26 | public void Do(float speed, float direction) 27 | { 28 | AnimatorStateInfo state = m_Animator.GetCurrentAnimatorStateInfo(0); 29 | 30 | bool inTransition = m_Animator.IsInTransition(0); 31 | bool inIdle = state.IsName("Locomotion.Idle"); 32 | bool inTurn = state.IsName("Locomotion.TurnOnSpot") || state.IsName("Locomotion.PlantNTurnLeft") || state.IsName("Locomotion.PlantNTurnRight"); 33 | bool inWalkRun = state.IsName("Locomotion.WalkRun"); 34 | 35 | float speedDampTime = inIdle ? 0 : m_SpeedDampTime; 36 | float angularSpeedDampTime = inWalkRun || inTransition ? m_AnguarSpeedDampTime : 0; 37 | float directionDampTime = inTurn || inTransition ? 1000000 : 0; 38 | float angularSpeed = direction / m_DirectionResponseTime; 39 | 40 | m_Animator.SetFloat(m_SpeedId, speed, speedDampTime, Time.deltaTime); 41 | m_Animator.SetFloat(m_AgularSpeedId, angularSpeed, angularSpeedDampTime, Time.deltaTime); 42 | m_Animator.SetFloat(m_DirectionId, direction, directionDampTime, Time.deltaTime); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Locomotion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c56ad4e789b516d41a20036d6eb5740b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Nodes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4c056c65845f3649937eccb8f0ee8ec 3 | folderAsset: yes 4 | timeCreated: 1484538738 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Nodes/Shoot.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | 4 | namespace BehavorTreeDesigner.Example 5 | { 6 | [Node(false, "Behavior/Action/Shoot")] 7 | public class Shoot : BaseBehaviorNode 8 | { 9 | private GameObject bullet; 10 | 11 | public override Node Create(Vector2 pos) 12 | { 13 | Shoot node = CreateInstance(); 14 | base.Init(node); 15 | 16 | node.rect = new Rect(pos.x, pos.y, 100, 80); 17 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 18 | 19 | return node; 20 | } 21 | 22 | public override void Init(BehaviorBlackboard data) 23 | { 24 | base.Init(data); 25 | bullet = Resources.Load("Bullet"); 26 | } 27 | 28 | public override NodeStatus Tick(BehaviorBlackboard data) 29 | { 30 | Transform agent = (Transform)data.Get("_BTD_Agent"); 31 | GameObject.Instantiate(bullet, agent.position + new Vector3(0, 1, 0), agent.rotation); 32 | return NodeStatus.SUCCESS; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Examples/Scripts/Nodes/Shoot.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f5748e2e4cf2144e911856932b43546 3 | timeCreated: 1484538780 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3759acc7567c63047b4a1cb5d04aef69 3 | folderAsset: yes 4 | timeCreated: 1506714634 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f51cd003f74808e47af919128c49377f 3 | folderAsset: yes 4 | timeCreated: 1484367190 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Editor/Node_Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8401bc163491af43a2392203eeed780 3 | folderAsset: yes 4 | timeCreated: 1484367191 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Editor/Node_Editor/LastSession.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Editor/Node_Editor/LastSession.asset -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Editor/Node_Editor/LastSession.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96baeb8ffcb3c3944ad3f2ace4c0e73f 3 | timeCreated: 1506788772 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Editor/Node_Editor/NodeEditorWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42cf354302a45214abf71c5b5f1b76d7 3 | timeCreated: 1484367193 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8752031cf773474c954156ead5451f4 3 | folderAsset: yes 4 | timeCreated: 1484367190 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73bda23171666db4fad7c4c0bb08860e 3 | folderAsset: yes 4 | timeCreated: 1484367191 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/CalculationCanvasType.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using NodeEditorFramework; 4 | 5 | namespace NodeEditorFramework.Standard 6 | { 7 | [NodeCanvasType("Calculation")] 8 | public class CalculationCanvasType : NodeCanvas 9 | { 10 | public override string canvasName { get { return "Calculation Canvas"; } } 11 | 12 | protected override void OnCreate () 13 | { 14 | Traversal = new DefaultCanvasCalculator (this); 15 | } 16 | 17 | public void OnEnable () 18 | { 19 | // Register to other callbacks, f.E.: 20 | //NodeEditorCallbacks.OnDeleteNode += OnDeleteNode; 21 | } 22 | 23 | protected override void OnValidate () 24 | { 25 | if (Traversal == null) 26 | Traversal = new DefaultCanvasCalculator (this); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/CalculationCanvasType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26a89c36c30b2e940804d7efcccaf0bd 3 | timeCreated: 1481402892 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/ConnectionTypes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4be5c7fe89350d249b9fd20d52cfb700 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/DefaultNodeCalculator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NodeEditorFramework; 3 | using UnityEngine; 4 | using System.Collections.Generic; 5 | 6 | namespace NodeEditorFramework.Standard 7 | { 8 | public class DefaultCanvasCalculator : NodeCanvasTraversal 9 | { 10 | // A list of Nodes from which calculation originates -> Call StartCalculation 11 | public List workList; 12 | private int calculationCount; 13 | 14 | public DefaultCanvasCalculator (NodeCanvas canvas) : base(canvas) 15 | { 16 | } 17 | 18 | /// 19 | /// Recalculate from every Input Node. 20 | /// Usually does not need to be called at all, the smart calculation system is doing the job just fine 21 | /// 22 | public override void TraverseAll () 23 | { 24 | workList = new List (); 25 | foreach (Node node in nodeCanvas.nodes) 26 | { 27 | if (node.isInput ()) 28 | { // Add all Inputs 29 | node.ClearCalculation (); 30 | workList.Add (node); 31 | } 32 | } 33 | StartCalculation (); 34 | } 35 | 36 | /// 37 | /// Recalculate from this node. 38 | /// Usually does not need to be called manually 39 | /// 40 | public override void OnChange (Node node) 41 | { 42 | node.ClearCalculation (); 43 | workList = new List { node }; 44 | StartCalculation (); 45 | } 46 | 47 | /// 48 | /// Iterates through workList and calculates everything, including children 49 | /// 50 | private void StartCalculation () 51 | { 52 | if (workList == null || workList.Count == 0) 53 | return; 54 | // this blocks iterates through the worklist and starts calculating 55 | // if a node returns false, it stops and adds the node to the worklist 56 | // this workList is worked on until it's empty or a limit is reached 57 | calculationCount = 0; 58 | bool limitReached = false; 59 | for (int roundCnt = 0; !limitReached; roundCnt++) 60 | { // Runs until every node possible is calculated 61 | limitReached = true; 62 | for (int workCnt = 0; workCnt < workList.Count; workCnt++) 63 | { 64 | if (ContinueCalculation (workList[workCnt])) 65 | limitReached = false; 66 | } 67 | if (roundCnt > 1000) 68 | limitReached = true; 69 | } 70 | } 71 | 72 | /// 73 | /// Recursive function which continues calculation on this node and all the child nodes 74 | /// Usually does not need to be called manually 75 | /// Returns success/failure of this node only 76 | /// 77 | private bool ContinueCalculation (Node node) 78 | { 79 | if (node.calculated) 80 | return false; 81 | if ((node.descendantsCalculated () || node.isInLoop ()) && node.Calculate ()) 82 | { // finished Calculating, continue with the children 83 | node.calculated = true; 84 | calculationCount++; 85 | workList.Remove (node); 86 | if (node.ContinueCalculation && calculationCount < 1000) 87 | { 88 | foreach (NodeOutput output in node.Outputs) 89 | { 90 | foreach (NodeInput connection in output.connections) 91 | ContinueCalculation (connection.body); 92 | } 93 | } 94 | else if (calculationCount >= 1000) 95 | Debug.LogError ("Stopped calculation because of suspected Recursion. Maximum calculation iteration is currently at 1000!"); 96 | return true; 97 | } 98 | else if (!workList.Contains (node)) 99 | { // failed to calculate, add it to check later 100 | workList.Add (node); 101 | } 102 | return false; 103 | } 104 | } 105 | } 106 | 107 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/DefaultNodeCalculator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82570dd096e3133488c3ad08f4bd59e9 3 | timeCreated: 1481043527 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/Node.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6b5fe394e83d344c990206132b84a28 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvas.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e0c2324a9ab1224ebe3edad393e3544 3 | timeCreated: 1437395312 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvasManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | using UnityEngine; 7 | 8 | using NodeEditorFramework.Utilities; 9 | 10 | namespace NodeEditorFramework 11 | { 12 | public class NodeCanvasManager 13 | { 14 | public static Dictionary CanvasTypes; 15 | private static Action _callBack; 16 | 17 | public static void GetAllCanvasTypes() 18 | { 19 | CanvasTypes = new Dictionary(); 20 | 21 | IEnumerable scriptAssemblies = AppDomain.CurrentDomain.GetAssemblies() 22 | .Where((Assembly assembly) => assembly.FullName.Contains("Assembly")); 23 | foreach (Assembly assembly in scriptAssemblies) 24 | { 25 | foreach (Type type in assembly.GetTypes() 26 | .Where( T => T.IsClass && !T.IsAbstract && 27 | (T != typeof(NodeCanvas) && T.IsSubclassOf (typeof(NodeCanvas))) && 28 | T.GetCustomAttributes(typeof (NodeCanvasTypeAttribute), false).Length > 0)) 29 | { 30 | object[] nodeAttributes = type.GetCustomAttributes(typeof (NodeCanvasTypeAttribute), false); 31 | NodeCanvasTypeAttribute attr = nodeAttributes[0] as NodeCanvasTypeAttribute; 32 | CanvasTypes.Add(type, new NodeCanvasTypeData() {CanvasType = type, DisplayString = attr.Name}); 33 | } 34 | } 35 | } 36 | 37 | private static void unwrapTypeCallback(object userdata) 38 | { 39 | NodeCanvasTypeData data = (NodeCanvasTypeData)userdata; 40 | _callBack(data.CanvasType); 41 | } 42 | 43 | public static void FillCanvasTypeMenu(ref GenericMenu menu, Action newNodeCanvas) 44 | { 45 | _callBack = newNodeCanvas; 46 | foreach (KeyValuePair data in CanvasTypes) 47 | { 48 | if(data.Value.DisplayString == "Behavior Canvas") 49 | menu.AddItem(new GUIContent(data.Value.DisplayString), false, unwrapTypeCallback, (object)data.Value); 50 | } 51 | } 52 | 53 | public static bool CheckCanvasCompability (string nodeID, NodeCanvas canvas) 54 | { 55 | NodeData data = NodeTypes.getNodeData (nodeID); 56 | return data.limitToCanvasTypes == null || data.limitToCanvasTypes.Length == 0 || data.limitToCanvasTypes.Contains (canvas.GetType ()); 57 | } 58 | 59 | public static NodeCanvasTypeData getCanvasTypeData (NodeCanvas canvas) 60 | { 61 | NodeCanvasTypeData data; 62 | CanvasTypes.TryGetValue (canvas.GetType (), out data); 63 | return data; 64 | } 65 | 66 | /// 67 | /// Converts the type of the canvas to the specified type. 68 | /// 69 | public static NodeCanvas ConvertCanvasType (NodeCanvas canvas, Type newType) 70 | { 71 | NodeCanvas convertedCanvas = canvas; 72 | if (canvas.GetType () != newType && newType != typeof(NodeCanvas) && newType.IsSubclassOf (typeof(NodeCanvas))) 73 | { 74 | canvas = NodeEditorSaveManager.CreateWorkingCopy (canvas, true); 75 | convertedCanvas = NodeCanvas.CreateCanvas(newType); 76 | convertedCanvas.nodes = canvas.nodes; 77 | convertedCanvas.editorStates = canvas.editorStates; 78 | convertedCanvas.Validate (); 79 | } 80 | return convertedCanvas; 81 | } 82 | } 83 | 84 | public struct NodeCanvasTypeData 85 | { 86 | public string DisplayString; 87 | public Type CanvasType; 88 | } 89 | 90 | public class NodeCanvasTypeAttribute : Attribute 91 | { 92 | public string Name; 93 | 94 | public NodeCanvasTypeAttribute(string displayName) 95 | { 96 | Name = displayName; 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvasManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3ac1ecc7eb0a6a4bae51b6e18010b92 3 | timeCreated: 1469444159 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvasSceneSave.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | 4 | public partial class NodeCanvasSceneSave : MonoBehaviour 5 | { 6 | public string saveName; 7 | public NodeCanvas savedNodeCanvas; 8 | } 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvasSceneSave.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f1cd8579a6c9ec4b85d9d62cd5ba58b 3 | timeCreated: 1464014559 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvasTraversal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NodeEditorFramework; 3 | 4 | namespace NodeEditorFramework 5 | { 6 | [Serializable] 7 | public abstract class NodeCanvasTraversal 8 | { 9 | public NodeCanvas nodeCanvas; 10 | 11 | public NodeCanvasTraversal (NodeCanvas canvas) 12 | { 13 | nodeCanvas = canvas; 14 | } 15 | 16 | public virtual void OnLoadCanvas () { } 17 | public virtual void OnSaveCanvas () { } 18 | 19 | public abstract void TraverseAll (); 20 | public virtual void OnChange (Node node) {} 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeCanvasTraversal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fff8d766888b10d4cbd14d6d865a1e72 3 | timeCreated: 1481043527 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b01efe70ff3f8d84da16ee5d254540a9 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorCallbackReceiver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f72444d2da0ade14aba9ff3102d17243 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d45bec52de54d834e818ca0ccb994c1f 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorInputControls.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76a77818258cdde43a807b810eb57074 3 | timeCreated: 1466001829 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorInputSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b51ae3192829104296c1fc1bf4f4068 3 | timeCreated: 1466001829 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorSaveManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 536538853a8430243a2f38355c7d4bbd 3 | timeCreated: 1453840956 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorState.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections.Generic; 4 | using NodeEditorFramework; 5 | 6 | namespace NodeEditorFramework 7 | { 8 | public partial class NodeEditorState : ScriptableObject 9 | { // holds the state of a NodeCanvas inside a NodeEditor 10 | public NodeCanvas canvas; 11 | public NodeEditorState parentEditor; 12 | 13 | // Canvas options 14 | public bool drawing = true; // whether to draw the canvas 15 | 16 | // Selection State 17 | public Node selectedNode; // selected Node 18 | [NonSerialized] public Node focusedNode; // Node under mouse 19 | [NonSerialized] public NodeKnob focusedNodeKnob; // NodeKnob under mouse 20 | [NonSerialized] public NodeGroup activeGroup; // NodeGroup that is currently interacted with 21 | 22 | // Navigation State 23 | public Vector2 panOffset = new Vector2 (); // pan offset 24 | public float zoom = 1; // zoom; Ranges in 0.2er-steps from 0.6-2.0; applied 1/zoom; 25 | 26 | // Current Action 27 | [NonSerialized] public NodeOutput connectOutput; // connection this output 28 | [NonSerialized] public bool dragNode; // node dragging 29 | [NonSerialized] public bool panWindow; // window panning 30 | [NonSerialized] public bool navigate; // navigation ('N') 31 | [NonSerialized] public bool resizeGroup; // whether the active group is being resized; if not, it is dragged 32 | 33 | // Temporary variables 34 | public Vector2 zoomPos { get { return canvasRect.size/2; } } // zoom center in canvas space 35 | [NonSerialized] public Rect canvasRect; // canvas Rect 36 | [NonSerialized] public Vector2 zoomPanAdjust; // calculated value to offset elements with when zooming 37 | [NonSerialized] public List ignoreInput = new List (); // Rects inside the canvas to ignore input in (nested canvases, fE) 38 | 39 | #region DragHelper 40 | 41 | [NonSerialized] public string dragUserID; // dragging source 42 | [NonSerialized] public Vector2 dragMouseStart; // drag start position (mouse) 43 | [NonSerialized] public Vector2 dragObjectStart; // start position of the dragged object 44 | [NonSerialized] public Vector2 dragOffset; // offset for both node dragging and window panning 45 | public Vector2 dragObjectPos { get { return dragObjectStart + dragOffset; } } // position of the dragged object 46 | 47 | /// 48 | /// Starts a drag operation with the given userID and initial mouse and object position 49 | /// Returns false when a different user already claims this drag operation 50 | /// 51 | public bool StartDrag (string userID, Vector2 mousePos, Vector2 objectPos) 52 | { 53 | if (!String.IsNullOrEmpty (dragUserID) && dragUserID != userID) 54 | return false; 55 | dragUserID = userID; 56 | dragMouseStart = mousePos; 57 | dragObjectStart = objectPos; 58 | dragOffset = Vector2.zero; 59 | return true; 60 | 61 | } 62 | 63 | /// 64 | /// Updates the current drag with the passed new mouse position and returns the drag offset change since the last update 65 | /// 66 | public Vector2 UpdateDrag (string userID, Vector2 newDragPos) 67 | { 68 | if (dragUserID != userID) 69 | throw new UnityException ("User ID " + userID + " tries to interrupt drag from " + dragUserID); 70 | Vector2 prevOffset = dragOffset; 71 | dragOffset = (newDragPos - dragMouseStart) * zoom; 72 | return dragOffset - prevOffset; 73 | } 74 | 75 | /// 76 | /// Ends the drag of the specified userID 77 | /// 78 | public Vector2 EndDrag (string userID) 79 | { 80 | if (dragUserID != userID) 81 | throw new UnityException ("User ID " + userID + " tries to end drag from " + dragUserID); 82 | Vector2 dragPos = dragObjectPos; 83 | dragUserID = ""; 84 | dragOffset = dragMouseStart = dragObjectStart = Vector2.zero; 85 | return dragPos; 86 | 87 | } 88 | 89 | #endregion 90 | } 91 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6ab6487237ff124ea4c2aa5de9ce3fb 3 | timeCreated: 1437395312 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeEditorUserCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bb1bb38f09a0534daf0b17a3e45693c 3 | timeCreated: 1466090292 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeGroup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a25adcb9d2c0e704a9b47bed372e4362 3 | timeCreated: 1482685563 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4caff27366054dd44a30ddb5be369acc 3 | timeCreated: 1437395312 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeKnob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8735025346ca7142b24d4e6d07ba742 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeOutput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42e7026d0da7df848ab67d517ac12d74 3 | timeCreated: 1437395312 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeTypes.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Collections.Generic; 6 | using NodeEditorFramework; 7 | 8 | namespace NodeEditorFramework 9 | { 10 | /// 11 | /// Handles fetching and storing of all NodeDeclarations 12 | /// 13 | public static class NodeTypes 14 | { 15 | public static Dictionary nodes; 16 | 17 | /// 18 | /// Fetches every Node Declaration in the assembly and stores them in the nodes List. 19 | /// nodes List contains a default instance of each node type in the key and editor specific NodeData in the value 20 | /// 21 | public static void FetchNodes() 22 | { 23 | nodes = new Dictionary (); 24 | 25 | IEnumerable scriptAssemblies = AppDomain.CurrentDomain.GetAssemblies ().Where ((Assembly assembly) => assembly.FullName.Contains ("Assembly")); 26 | foreach (Assembly assembly in scriptAssemblies) 27 | { 28 | foreach (Type type in assembly.GetTypes().Where(T => T.IsClass && !T.IsAbstract && T.IsSubclassOf(typeof(Node)))) 29 | { 30 | object[] nodeAttributes = type.GetCustomAttributes(typeof(NodeAttribute), false); 31 | NodeAttribute attr = nodeAttributes[0] as NodeAttribute; 32 | if(attr == null || !attr.hide) 33 | { 34 | Node node = (Node)ScriptableObject.CreateInstance (type); // Create a 'raw' instance (not setup using the appropriate Create function) 35 | node = node.Create (Vector2.zero); // From that, call the appropriate Create Method to init the previously 'raw' instance 36 | nodes.Add (node, new NodeData (attr == null? node.name : attr.contextText, attr.limitToCanvasTypes)); 37 | } 38 | } 39 | } 40 | } 41 | 42 | /// 43 | /// Returns the NodeData for the given Node 44 | /// 45 | public static NodeData getNodeData (string nodeID) 46 | { 47 | return nodes [getDefaultNode (nodeID)]; 48 | } 49 | 50 | /// 51 | /// Returns the default node from the given nodeID. 52 | /// The default node is a dummy used to create other nodes (Due to various limitations creation has to be performed on Node instances) 53 | /// 54 | public static Node getDefaultNode (string nodeID) 55 | { 56 | return nodes.Keys.Single ((Node node) => node.GetID == nodeID); 57 | } 58 | 59 | /// 60 | /// Returns the default node from the node type. 61 | /// The default node is a dummy used to create other nodes (Due to various limitations creation has to be performed on Node instances) 62 | /// 63 | public static T getDefaultNode () where T : Node 64 | { 65 | return nodes.Keys.Single ((Node node) => node.GetType () == typeof (T)) as T; 66 | } 67 | 68 | /// 69 | /// Gets the compatible nodes that have atleast one NodeInput that can connect to the given nodeOutput 70 | /// 71 | public static List getCompatibleNodes (NodeOutput nodeOutput) 72 | { 73 | if (nodeOutput == null) 74 | throw new ArgumentNullException ("nodeOutput"); 75 | List compatibleNodes = new List (); 76 | foreach (Node node in NodeTypes.nodes.Keys) 77 | { // Check if any of the NodeInputs is able to connect to the given NodeOutput 78 | for (int inputCnt = 0; inputCnt < node.Inputs.Count; inputCnt++) 79 | { // Checking for compability, not using CanApplyConnection to leave out unnessecary dependancy checks 80 | NodeInput input = node.Inputs[inputCnt]; 81 | if (input == null) 82 | throw new UnityException ("Input " + inputCnt + " is null!"); 83 | if (input.typeData.Type.IsAssignableFrom (nodeOutput.typeData.Type)) 84 | { 85 | compatibleNodes.Add (node); 86 | break; 87 | } 88 | } 89 | } 90 | return compatibleNodes; 91 | } 92 | } 93 | 94 | /// 95 | /// The NodeData contains the additional, editor specific data of a node type 96 | /// 97 | public struct NodeData 98 | { 99 | public string adress; 100 | public Type[] limitToCanvasTypes; 101 | 102 | public NodeData (string name, Type[] limitedCanvasTypes) 103 | { 104 | adress = name; 105 | limitToCanvasTypes = limitedCanvasTypes; 106 | } 107 | } 108 | 109 | /// 110 | /// The NodeAttribute is used to specify editor specific data for a node type, later stored using a NodeData 111 | /// 112 | public class NodeAttribute : Attribute 113 | { 114 | public bool hide { get; private set; } 115 | public string contextText { get; private set; } 116 | public Type[] limitToCanvasTypes { get; private set; } 117 | 118 | public NodeAttribute (bool HideNode, string ReplacedContextText) 119 | { 120 | hide = HideNode; 121 | contextText = ReplacedContextText; 122 | limitToCanvasTypes = null; 123 | } 124 | 125 | public NodeAttribute (bool HideNode, string ReplacedContextText, Type[] limitedCanvasTypes) 126 | { 127 | hide = HideNode; 128 | contextText = ReplacedContextText; 129 | limitToCanvasTypes = limitedCanvasTypes; 130 | } 131 | } 132 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Framework/NodeTypes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cdfbc99cfb2a2c4db2bb4cbbec242fc 3 | timeCreated: 1449162341 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 665bdefc14074ee479de28ec10461952 3 | folderAsset: yes 4 | timeCreated: 1484367190 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/LineShader.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "Hidden/LineShader" 4 | { 5 | SubShader 6 | { 7 | Blend SrcAlpha OneMinusSrcAlpha 8 | ZWrite Off 9 | Cull Off 10 | Fog { Mode Off } 11 | 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | 18 | uniform float4 _LineColor; 19 | uniform sampler2D _LineTexture; 20 | 21 | struct v2f 22 | { 23 | float2 texcoord : TEXCOORD0; 24 | float4 vertex : POSITION; 25 | }; 26 | 27 | v2f vert (float2 texcoord : TEXCOORD0, float4 vertex : POSITION) 28 | { 29 | v2f o; 30 | o.vertex = UnityObjectToClipPos(vertex); 31 | o.texcoord = texcoord; 32 | return o; 33 | } 34 | 35 | float4 frag (v2f i) : COLOR 36 | { 37 | return _LineColor * tex2D (_LineTexture, i.texcoord); 38 | } 39 | ENDCG 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/LineShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dbe25b61ffcc904cac01ecc43148420 3 | timeCreated: 1484367217 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 634e1c88e04f8cf4fb7f708fbc600feb 3 | folderAsset: yes 4 | timeCreated: 1484367191 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/AALine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/AALine.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/AALine.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef3fefb6407298c42bbcbc73ad562830 3 | timeCreated: 1437572302 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 0 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 3, z: 0, w: 3} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 2 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Icon_Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Icon_Dark.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Icon_Dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7e0ecbca30f9b347bb68f235cd9cae4 3 | timeCreated: 1450128686 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -2 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 2 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Icon_Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Icon_Light.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Icon_Light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bfe9901a943bc04ebeae2ba7f8f409e 3 | timeCreated: 1450128686 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -2 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 2 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/In_Knob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/In_Knob.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/In_Knob.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abb6137f2f8441f4caa48872db0b26e0 3 | timeCreated: 1437259204 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 2 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Knobs.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Knobs.xcf -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Knobs.xcf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff7f91b939ae6d94db540d2ee38349fe 3 | timeCreated: 1450128681 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_Box.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_Box.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3362057e6db2cea428eb8de4a4800db0 3 | timeCreated: 1453313403 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 7 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 0 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 2 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 3, y: 3, z: 3, w: 3} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_Button.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_Button.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acc3252d2ced34346a4fb935f95286e3 3 | timeCreated: 1441568627 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 2 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 4, y: 7, z: 4, w: 4} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_GUI.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_GUI.xcf -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/NE_GUI.xcf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52c97a505457a9c4a9090a94d1701247 3 | timeCreated: 1450128681 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Out_Knob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Out_Knob.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/Out_Knob.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d39755f0456c1284d8330cdf12c03faf 3 | timeCreated: 1437259204 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 2 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/background.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/background.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ab1df7fc134e8b4c86823e805911657 3 | timeCreated: 1437259204 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -2 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: 2 33 | aniso: 0 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/expandRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/expandRight.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Resources/Textures/expandRight.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b09b3b201c310aa48aacdc1446dfc4bb 3 | timeCreated: 1441487997 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -2 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 2 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 510505d67c16f314d923ba4770d266df 3 | folderAsset: yes 4 | timeCreated: 1484367190 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/EditorLoadingControl.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | 3 | using UnityEngine; 4 | using UnityEditor; 5 | #if UNITY_5_3_OR_NEWER || UNITY_5_3 6 | using UnityEngine.SceneManagement; 7 | using UnityEditor.SceneManagement; 8 | #endif 9 | using System; 10 | 11 | namespace NodeEditorFramework.Utilities 12 | { 13 | [InitializeOnLoad] 14 | public static class EditorLoadingControl 15 | { 16 | #if UNITY_5_3_OR_NEWER || UNITY_5_3 17 | private static Scene loadedScene; 18 | #else 19 | private static string loadedScene; 20 | #endif 21 | 22 | private static bool serializationTest = false; 23 | private static bool playmodeSwitchToEdit = false; 24 | private static bool toggleLateEnteredPlaymode = false; 25 | 26 | public static Action beforeEnteringPlayMode; 27 | public static Action justEnteredPlayMode; 28 | public static Action lateEnteredPlayMode; 29 | public static Action beforeLeavingPlayMode; 30 | public static Action justLeftPlayMode; 31 | public static Action justOpenedNewScene; 32 | 33 | static EditorLoadingControl () 34 | { 35 | EditorApplication.playmodeStateChanged -= PlaymodeStateChanged; 36 | EditorApplication.playmodeStateChanged += PlaymodeStateChanged; 37 | EditorApplication.update -= Update; 38 | EditorApplication.update += Update; 39 | EditorApplication.hierarchyWindowChanged -= OnHierarchyChange; 40 | EditorApplication.hierarchyWindowChanged += OnHierarchyChange; 41 | } 42 | 43 | private static void OnHierarchyChange () 44 | { // TODO: OnGUI might be called before this function and migth cause problems. Find a better way to detect scene change! 45 | #if UNITY_5_3_OR_NEWER || UNITY_5_3 46 | Scene currentScene = EditorSceneManager.GetActiveScene (); 47 | #else 48 | string currentScene = Application.loadedLevelName; 49 | #endif 50 | if (loadedScene != currentScene) 51 | { 52 | if (justOpenedNewScene != null) 53 | justOpenedNewScene.Invoke (); 54 | loadedScene = currentScene; 55 | } 56 | } 57 | 58 | // Handles just after switch (non-serialized values lost) 59 | private static void Update () 60 | { 61 | if (toggleLateEnteredPlaymode) 62 | { 63 | toggleLateEnteredPlaymode = false; 64 | if (lateEnteredPlayMode != null) 65 | lateEnteredPlayMode.Invoke (); 66 | } 67 | serializationTest = true; 68 | } 69 | 70 | private static void PlaymodeStateChanged () 71 | { 72 | //Debug.Log ("Playmode State Change! isPlaying: " + Application.isPlaying + "; Serialized: " + serializationTest); 73 | if (!Application.isPlaying) 74 | { // Edit Mode 75 | if (playmodeSwitchToEdit) 76 | { // After Playmode 77 | //Debug.Log ("LOAD PLAY MODE Values in Edit Mode!!"); 78 | if (justLeftPlayMode != null) 79 | justLeftPlayMode.Invoke (); 80 | playmodeSwitchToEdit = false; 81 | } 82 | else 83 | { // Before Playmode 84 | //Debug.Log ("SAVE EDIT MODE Values before Play Mode!!"); 85 | if (beforeEnteringPlayMode != null) 86 | beforeEnteringPlayMode.Invoke (); 87 | } 88 | } 89 | else 90 | { // Play Mode 91 | if (serializationTest) 92 | { // Before Leaving Playmode 93 | //Debug.Log ("SAVE PLAY MODE Values before Edit Mode!!"); 94 | if (beforeLeavingPlayMode != null) 95 | beforeLeavingPlayMode.Invoke (); 96 | playmodeSwitchToEdit = true; 97 | } 98 | else 99 | { // After Entering Playmode 100 | //Debug.Log ("LOAD EDIT MODE Values in Play Mode!!"); 101 | if (justEnteredPlayMode != null) 102 | justEnteredPlayMode.Invoke (); 103 | toggleLateEnteredPlaymode = true; 104 | } 105 | 106 | } 107 | } 108 | } 109 | } 110 | #endif -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/EditorLoadingControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ca3bbd7d49b56d44b77a3ac13fd6844 3 | timeCreated: 1484367193 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/GUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 408420ada7175a34fb7a003928ef7222 3 | folderAsset: yes 4 | timeCreated: 1484367191 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/GUI/GUIScaleUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0e4a2e208babfd45bdf9bdf213dea84 3 | timeCreated: 1484367194 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/GUI/OverlayGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a64558e5b2ab7a049bc5ccff3c4ad478 3 | timeCreated: 1484367194 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/GUI/RTEditorGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9539a333a8b1ac748b06a1fe16a3bb43 3 | timeCreated: 1484367193 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/ResourceManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54bfe487f09db7144b539fa4a671c080 3 | timeCreated: 1484367193 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/link.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Node_Editor/Node_Editor/Utilities/link.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b3989b103c46944bbd7b63785b36417 3 | timeCreated: 1484367217 4 | licenseType: Free 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82fd04131b3206449a507f11f25c6357 3 | folderAsset: yes 4 | timeCreated: 1506714634 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: edea903650b1ded4b98dbb4d65d344bf 3 | folderAsset: yes 4 | timeCreated: 1484513912 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Inverter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Inverter.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Inverter.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f2aabb1b9a6d69489e608fd6079a0dd 3 | timeCreated: 1484448984 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Logger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Logger.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Logger.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d7ef77dce6f12a4db58a58891e341b4 3 | timeCreated: 1484516570 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Parallel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Parallel.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Parallel.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 317a5dd252b1f2f4baa549385e4a77bb 3 | timeCreated: 1484453228 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Repeater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Repeater.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Repeater.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cc4757525974794aa698a03b3620fb6 3 | timeCreated: 1484456177 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Selector.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Selector.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 382f0d5291d5b9e45a82c14fe72c3870 3 | timeCreated: 1484449016 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/virror/BehaviorTreeDesigner/98682c22096712d1f2a511852c2388226a9887fd/Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Sequence.png -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Resources/BehavorIcons/Sequence.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2a1a80e8a6e1324f9d0f692375ceee3 3 | timeCreated: 1484443277 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 0 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6647cc62d76e536448f50ff482c8573d 3 | folderAsset: yes 4 | timeCreated: 1506714634 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/BehaviorBlackboard.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BehavorTreeDesigner 4 | { 5 | public class BehaviorBlackboard 6 | { 7 | public Dictionary blackboard; 8 | public static Dictionary globalBlackboard; 9 | 10 | public BehaviorBlackboard() 11 | { 12 | blackboard = new Dictionary(); 13 | globalBlackboard = new Dictionary(); 14 | } 15 | 16 | public void Add(string key, object obj) 17 | { 18 | if(!blackboard.ContainsKey(key)) 19 | { 20 | blackboard.Add(key, obj); 21 | } 22 | else 23 | { 24 | blackboard[key] = obj; 25 | } 26 | } 27 | 28 | public object Get(string key) 29 | { 30 | object obj; 31 | blackboard.TryGetValue(key, out obj); 32 | return obj; 33 | } 34 | 35 | //Global blackboard 36 | public void AddGlobal(string key, object obj) 37 | { 38 | if(!globalBlackboard.ContainsKey(key)) 39 | { 40 | globalBlackboard.Add(key, obj); 41 | } 42 | else 43 | { 44 | globalBlackboard[key] = obj; 45 | } 46 | } 47 | 48 | public object GetGlobal(string key) 49 | { 50 | object obj; 51 | globalBlackboard.TryGetValue(key, out obj); 52 | return obj; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/BehaviorBlackboard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e46cdc39d7d6bbb4db63fcb3a841f097 3 | timeCreated: 1484524832 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/BehaviorCanvas.cs: -------------------------------------------------------------------------------- 1 | using NodeEditorFramework; 2 | 3 | namespace BehavorTreeDesigner 4 | { 5 | [NodeCanvasType("Behavior Canvas")] 6 | public class BehaviorCanvas : NodeCanvas 7 | { 8 | public BaseBehaviorNode GetRootNode() 9 | { 10 | foreach(Node node in this.nodes) 11 | { 12 | if(node is Root) 13 | { 14 | return (BaseBehaviorNode)node; 15 | } 16 | } 17 | return null; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/BehaviorCanvas.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eae7d540a0949e0479785e26fb9b33f2 3 | timeCreated: 1484369533 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/BehaviorManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BehavorTreeDesigner 4 | { 5 | public class BehaviorManager : MonoBehaviour 6 | { 7 | public BehaviorCanvas behaviorTree; 8 | public float tickTime = 0.5f; 9 | public Transform agent; 10 | [HideInInspector] 11 | public BehaviorBlackboard data; 12 | 13 | private BaseBehaviorNode rootNode; 14 | 15 | private void Awake() 16 | { 17 | if(behaviorTree == null) 18 | { 19 | Debug.LogError("Behavor Tree Designer\nNo behavior assigned!"); 20 | return; 21 | } 22 | if(agent == null) 23 | { 24 | Debug.LogError("Behavor Tree Designer\nNo agent assigned!"); 25 | return; 26 | } 27 | 28 | data = new BehaviorBlackboard(); 29 | data.Add("_BTD_Agent", agent); 30 | rootNode = behaviorTree.GetRootNode(); 31 | } 32 | 33 | private void Start() 34 | { 35 | rootNode.Init(data); 36 | InvokeRepeating("DoTick", 0, tickTime); 37 | } 38 | 39 | private void DoTick () 40 | { 41 | rootNode.Tick(data); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/BehaviorManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: baade83c1b46f654eb3eff747de86268 3 | timeCreated: 1484528910 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/ColliderHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ColliderHelper : MonoBehaviour 6 | { 7 | public string allowedName; 8 | [HideInInspector] 9 | public Transform trigger; 10 | 11 | private void OnTriggerEnter(Collider other) 12 | { 13 | if(allowedName == other.name) 14 | { 15 | trigger = other.transform; 16 | } 17 | } 18 | 19 | private void OnTriggerExit(Collider other) 20 | { 21 | if(allowedName == other.name) 22 | { 23 | trigger = null; 24 | } 25 | } 26 | 27 | private void OnDestroy() 28 | { 29 | trigger = null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/ColliderHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bedbcffea781b064f888d6c429ed3a91 3 | timeCreated: 1486765969 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc0952b350bf5004a8d8f252b7bb59bf 3 | folderAsset: yes 4 | timeCreated: 1484420862 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15cd3186b214acd41ba0a4fd06fe0797 3 | folderAsset: yes 4 | timeCreated: 1484421123 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43947e1c879270f4fad0caac68c8114b 3 | folderAsset: yes 4 | timeCreated: 1507062787 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetBool.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Animation/SetBool")] 8 | public class SetBool : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string parameter = ""; 12 | [SerializeField] 13 | private bool enabled; 14 | Animator anim; 15 | 16 | public override Node Create(Vector2 pos) 17 | { 18 | SetBool node = CreateInstance(); 19 | base.Init(node); 20 | 21 | node.rect = new Rect(pos.x, pos.y, 120, 95); 22 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 23 | 24 | return node; 25 | } 26 | 27 | protected override void NodeGUI() 28 | { 29 | GUILayout.Label("Parameter:"); 30 | parameter = EditorGUILayout.TextField(parameter); 31 | GUILayout.Label("Enabled:"); 32 | enabled = EditorGUILayout.Toggle(enabled); 33 | } 34 | 35 | public override void Init(BehaviorBlackboard data) 36 | { 37 | base.Init(data); 38 | anim = ((Transform)data.Get("_BTD_Agent")).GetComponent(); 39 | } 40 | 41 | public override NodeStatus Tick(BehaviorBlackboard data) 42 | { 43 | anim.SetBool(parameter, enabled); 44 | return NodeStatus.SUCCESS; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetBool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b36aae21e77e394fbbbdfc78642e4de 3 | timeCreated: 1507062360 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetFloat.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Animation/SetFloat")] 8 | public class SetFloat : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string parameter = ""; 12 | [SerializeField] 13 | private float value; 14 | Animator anim; 15 | 16 | public override Node Create(Vector2 pos) 17 | { 18 | SetFloat node = CreateInstance(); 19 | base.Init(node); 20 | 21 | node.rect = new Rect(pos.x, pos.y, 120, 95); 22 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 23 | 24 | return node; 25 | } 26 | 27 | protected override void NodeGUI() 28 | { 29 | GUILayout.Label("Parameter:"); 30 | parameter = EditorGUILayout.TextField(parameter); 31 | GUILayout.Label("Value:"); 32 | value = EditorGUILayout.FloatField(value); 33 | } 34 | 35 | public override void Init(BehaviorBlackboard data) 36 | { 37 | base.Init(data); 38 | anim = ((Transform)data.Get("_BTD_Agent")).GetComponent(); 39 | } 40 | 41 | public override NodeStatus Tick(BehaviorBlackboard data) 42 | { 43 | anim.SetFloat(parameter, value); 44 | return NodeStatus.SUCCESS; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetFloat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a338d1c89fa49b4788b6d5c7f618af9 3 | timeCreated: 1507063466 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetInteger.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Animation/SetInteger")] 8 | public class SetInteger : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string parameter = ""; 12 | [SerializeField] 13 | private int value; 14 | Animator anim; 15 | 16 | public override Node Create(Vector2 pos) 17 | { 18 | SetInteger node = CreateInstance(); 19 | base.Init(node); 20 | 21 | node.rect = new Rect(pos.x, pos.y, 120, 95); 22 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 23 | 24 | return node; 25 | } 26 | 27 | protected override void NodeGUI() 28 | { 29 | GUILayout.Label("Parameter:"); 30 | parameter = EditorGUILayout.TextField(parameter); 31 | GUILayout.Label("Value:"); 32 | value = EditorGUILayout.IntField(value); 33 | } 34 | 35 | public override void Init(BehaviorBlackboard data) 36 | { 37 | base.Init(data); 38 | anim = ((Transform)data.Get("_BTD_Agent")).GetComponent(); 39 | } 40 | 41 | public override NodeStatus Tick(BehaviorBlackboard data) 42 | { 43 | anim.SetInteger(parameter, value); 44 | return NodeStatus.SUCCESS; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetInteger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ac2f1f48dea26845a7e96575dea695c 3 | timeCreated: 1507063449 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetTrigger.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Animation/SetTrigger")] 8 | public class SetTrigger : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string parameter = ""; 12 | Animator anim; 13 | 14 | public override Node Create(Vector2 pos) 15 | { 16 | SetTrigger node = CreateInstance(); 17 | base.Init(node); 18 | 19 | node.rect = new Rect(pos.x, pos.y, 120, 95); 20 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 21 | 22 | return node; 23 | } 24 | 25 | protected override void NodeGUI() 26 | { 27 | GUILayout.Label("Parameter:"); 28 | parameter = EditorGUILayout.TextField(parameter); 29 | } 30 | 31 | public override void Init(BehaviorBlackboard data) 32 | { 33 | base.Init(data); 34 | anim = ((Transform)data.Get("_BTD_Agent")).GetComponent(); 35 | } 36 | 37 | public override NodeStatus Tick(BehaviorBlackboard data) 38 | { 39 | anim.SetTrigger(parameter); 40 | return NodeStatus.SUCCESS; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Animation/SetTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d512a54562c4a744f84c7c1c58a93286 3 | timeCreated: 1507063439 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c853ebae10cb5ec4aa532d005c26a95d 3 | folderAsset: yes 4 | timeCreated: 1486757465 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/HasEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Entries/HasEntry")] 8 | public class HasEntry : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string entry = ""; 12 | [SerializeField] 13 | private EntryType entType; 14 | [SerializeField] 15 | private bool boolEntry = false; 16 | [SerializeField] 17 | private int intEntry = 0; 18 | [SerializeField] 19 | private float floatEntry = 0; 20 | 21 | public override Node Create(Vector2 pos) 22 | { 23 | HasEntry node = CreateInstance(); 24 | base.Init(node); 25 | 26 | node.rect = new Rect(pos.x, pos.y, 100, 130); 27 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 28 | 29 | return node; 30 | } 31 | 32 | protected override void NodeGUI() 33 | { 34 | GUILayout.Label("Entry:"); 35 | entry = EditorGUILayout.TextField(entry); 36 | GUILayout.Label("Type:"); 37 | entType = (EntryType)EditorGUILayout.EnumPopup(entType); 38 | switch (entType) 39 | { 40 | case EntryType.BOOL: 41 | GUILayout.Label("Value:"); 42 | boolEntry = EditorGUILayout.Toggle(boolEntry); 43 | break; 44 | case EntryType.INTEGER: 45 | GUILayout.Label("Value:"); 46 | intEntry = EditorGUILayout.IntField(intEntry); 47 | break; 48 | case EntryType.FLOAT: 49 | GUILayout.Label("Value:"); 50 | floatEntry = EditorGUILayout.FloatField(floatEntry); 51 | break; 52 | case EntryType.CLASS: 53 | GUILayout.Label("Value:"); 54 | GUILayout.Label("Not null"); 55 | break; 56 | default: 57 | break; 58 | } 59 | } 60 | 61 | public override NodeStatus Tick(BehaviorBlackboard data) 62 | { 63 | NodeStatus retVal = NodeStatus.FAILURE; 64 | switch (entType) 65 | { 66 | case EntryType.BOOL: 67 | if(boolEntry == (bool)data.Get(entry)) 68 | retVal = NodeStatus.SUCCESS; 69 | break; 70 | case EntryType.INTEGER: 71 | if(intEntry == (int)data.Get(entry)) 72 | retVal = NodeStatus.SUCCESS; 73 | break; 74 | case EntryType.FLOAT: 75 | if(floatEntry == (float)data.Get(entry)) 76 | retVal = NodeStatus.SUCCESS; 77 | break; 78 | case EntryType.CLASS: 79 | if(data.Get(entry) != null) 80 | retVal = NodeStatus.SUCCESS; 81 | break; 82 | default: 83 | retVal = NodeStatus.ERROR; 84 | break; 85 | } 86 | return retVal; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/HasEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 484441c7e30ae63488a4532eada05116 3 | timeCreated: 1486705648 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/LayerToEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections.Generic; 4 | using NodeEditorFramework; 5 | 6 | namespace BehavorTreeDesigner 7 | { 8 | [Node(false, "Behavior/Action/Entries/LayerToEntry")] 9 | public class LayerToEntry : BaseBehaviorNode 10 | { 11 | [SerializeField] 12 | private int selectedLayer; 13 | [SerializeField] 14 | private string entry = ""; 15 | 16 | public override Node Create(Vector2 pos) 17 | { 18 | LayerToEntry node = CreateInstance(); 19 | base.Init(node); 20 | 21 | node.rect = new Rect(pos.x, pos.y, 120, 95); 22 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 23 | 24 | return node; 25 | } 26 | 27 | protected override void NodeGUI() 28 | { 29 | GUILayout.Label("Layer:"); 30 | selectedLayer = EditorGUILayout.LayerField(selectedLayer); 31 | GUILayout.Label("Entry:"); 32 | entry = EditorGUILayout.TextField(entry); 33 | } 34 | 35 | public override NodeStatus Tick(BehaviorBlackboard data) 36 | { 37 | GameObject[] objects = (GameObject[])GameObject.FindObjectsOfType(typeof(GameObject)); 38 | Transform agent; 39 | Transform closest; 40 | float minDist; 41 | 42 | if(objects.Length == 0) 43 | { 44 | return NodeStatus.FAILURE; 45 | } 46 | 47 | List layerList = new List(); 48 | for (int i = 0; i < objects.Length; i++) 49 | { 50 | if (objects[i].layer == selectedLayer) 51 | { 52 | layerList.Add(objects[i]); 53 | } 54 | } 55 | 56 | agent = (Transform)data.Get("_BTD_Agent"); 57 | minDist = Vector3.Distance(agent.position, objects[0].transform.position); 58 | closest = objects[0].transform; 59 | 60 | for(int i = 1; i < objects.Length; i++) 61 | { 62 | float distance = Vector3.Distance(agent.position, objects[i].transform.position); 63 | if(distance < minDist) 64 | { 65 | minDist = distance; 66 | closest = objects[i].transform; 67 | } 68 | } 69 | 70 | data.Add(entry, closest); 71 | return NodeStatus.SUCCESS; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/LayerToEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce0b90b67bbe57f428c6451bf52ab2b7 3 | timeCreated: 1486757465 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/SetEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Entries/SetEntry")] 8 | public class SetEntry : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string entry = ""; 12 | [SerializeField] 13 | private EntryType entType; 14 | [SerializeField] 15 | private bool boolEntry = false; 16 | [SerializeField] 17 | private int intEntry = 0; 18 | [SerializeField] 19 | private float floatEntry = 0; 20 | 21 | public override Node Create(Vector2 pos) 22 | { 23 | SetEntry node = CreateInstance(); 24 | base.Init(node); 25 | 26 | node.rect = new Rect(pos.x, pos.y, 100, 130); 27 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 28 | 29 | return node; 30 | } 31 | 32 | protected override void NodeGUI() 33 | { 34 | GUILayout.Label("Entry:"); 35 | entry = EditorGUILayout.TextField(entry); 36 | GUILayout.Label("Type:"); 37 | entType = (EntryType)EditorGUILayout.EnumPopup(entType); 38 | switch (entType) 39 | { 40 | case EntryType.BOOL: 41 | GUILayout.Label("Value:"); 42 | boolEntry = EditorGUILayout.Toggle(boolEntry); 43 | break; 44 | case EntryType.INTEGER: 45 | GUILayout.Label("Value:"); 46 | intEntry = EditorGUILayout.IntField(intEntry); 47 | break; 48 | case EntryType.FLOAT: 49 | GUILayout.Label("Value:"); 50 | floatEntry = EditorGUILayout.FloatField(floatEntry); 51 | break; 52 | case EntryType.CLASS: 53 | GUILayout.Label("Value:"); 54 | GUILayout.Label("null"); 55 | break; 56 | default: 57 | break; 58 | } 59 | } 60 | 61 | public override NodeStatus Tick(BehaviorBlackboard data) 62 | { 63 | switch (entType) 64 | { 65 | case EntryType.BOOL: 66 | data.Add(entry, boolEntry); 67 | break; 68 | case EntryType.INTEGER: 69 | data.Add(entry, intEntry); 70 | break; 71 | case EntryType.FLOAT: 72 | data.Add(entry, floatEntry); 73 | break; 74 | case EntryType.CLASS: 75 | data.Add(entry, null); 76 | break; 77 | default: 78 | return NodeStatus.ERROR; 79 | } 80 | return NodeStatus.SUCCESS; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/SetEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 735dab6d0c79bf947bdda1eaff3c571d 3 | timeCreated: 1486699639 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/TagToEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Entries/TagToEntry")] 8 | public class TagToEntry : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string selectedTag = ""; 12 | [SerializeField] 13 | private string entry = ""; 14 | 15 | public override Node Create(Vector2 pos) 16 | { 17 | TagToEntry node = CreateInstance(); 18 | base.Init(node); 19 | 20 | node.rect = new Rect(pos.x, pos.y, 120, 95); 21 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 22 | 23 | return node; 24 | } 25 | 26 | protected override void NodeGUI() 27 | { 28 | GUILayout.Label("Tag:"); 29 | selectedTag = EditorGUILayout.TagField(selectedTag); 30 | GUILayout.Label("Entry:"); 31 | entry = EditorGUILayout.TextField(entry); 32 | } 33 | 34 | public override NodeStatus Tick(BehaviorBlackboard data) 35 | { 36 | GameObject[] objects = GameObject.FindGameObjectsWithTag(selectedTag); 37 | Transform agent; 38 | Transform closest; 39 | float minDist; 40 | 41 | if(objects.Length == 0) 42 | { 43 | return NodeStatus.FAILURE; 44 | } 45 | 46 | agent = (Transform)data.Get("_BTD_Agent"); 47 | minDist = Vector3.Distance(agent.position, objects[0].transform.position); 48 | closest = objects[0].transform; 49 | 50 | for(int i = 1; i < objects.Length; i++) 51 | { 52 | float distance = Vector3.Distance(agent.position, objects[i].transform.position); 53 | if(distance < minDist) 54 | { 55 | minDist = distance; 56 | closest = objects[i].transform; 57 | } 58 | } 59 | 60 | data.Add(entry, closest); 61 | return NodeStatus.SUCCESS; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/TagToEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3093e8bfdbd0154faec5d58d2b553c4 3 | timeCreated: 1486699072 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/TriggerToEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/Entries/TriggerToEntry")] 8 | public class TriggerToEntry : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string childName = ""; 12 | [SerializeField] 13 | private string entry = ""; 14 | 15 | public override Node Create(Vector2 pos) 16 | { 17 | TriggerToEntry node = CreateInstance(); 18 | base.Init(node); 19 | 20 | node.rect = new Rect(pos.x, pos.y, 120, 95); 21 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 22 | 23 | return node; 24 | } 25 | 26 | protected override void NodeGUI() 27 | { 28 | GUILayout.Label("Child name:"); 29 | childName = EditorGUILayout.TextField(childName); 30 | GUILayout.Label("Entry:"); 31 | entry = EditorGUILayout.TextField(entry); 32 | } 33 | 34 | public override NodeStatus Tick(BehaviorBlackboard data) 35 | { 36 | Transform agent = (Transform)data.Get("_BTD_Agent"); 37 | Transform child = agent.Find(childName); 38 | 39 | if(child != null) 40 | { 41 | ColliderHelper colHelper = child.GetComponent(); 42 | if(colHelper != null) 43 | { 44 | if(colHelper.trigger != null) 45 | { 46 | data.Add(entry, colHelper.trigger); 47 | return NodeStatus.SUCCESS; 48 | } 49 | else 50 | { 51 | return NodeStatus.FAILURE; 52 | } 53 | } 54 | else 55 | { 56 | Debug.LogError("Behavor Tree Designer\nNo ColliderHelper script found on child: " + childName + " on object: " + agent.name); 57 | return NodeStatus.ERROR; 58 | } 59 | } 60 | else 61 | { 62 | Debug.LogError("Behavor Tree Designer\nChild: " + childName + " not found on object: " + agent.name); 63 | return NodeStatus.ERROR; 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/Entries/TriggerToEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0f2c8bcdf7f0a746a1adcab0c8a7d44 3 | timeCreated: 1486785113 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/GetNextWaypoint.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Action/GetNextWaypoint")] 8 | public class GetNextWaypoint : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string entry = ""; 12 | [SerializeField] 13 | private string waypoint = ""; 14 | private Transform waypointParent; 15 | private bool backwards = false; 16 | 17 | public override Node Create(Vector2 pos) 18 | { 19 | GetNextWaypoint node = CreateInstance(); 20 | base.Init(node); 21 | 22 | node.rect = new Rect(pos.x, pos.y, 120, 95); 23 | node.CreateInput("In", "Behave", NodeSide.Top, 60); 24 | 25 | return node; 26 | } 27 | 28 | protected override void NodeGUI() 29 | { 30 | GUILayout.Label("Entry:"); 31 | entry = EditorGUILayout.TextField(entry); 32 | GUILayout.Label("Waypoint:"); 33 | waypoint = EditorGUILayout.TextField(waypoint); 34 | } 35 | 36 | public override void Init(BehaviorBlackboard data) 37 | { 38 | base.Init(data); 39 | data.Add("_BTD_WaypointIndex", -1); 40 | } 41 | 42 | public override NodeStatus Tick(BehaviorBlackboard data) 43 | { 44 | int index = (int)data.Get("_BTD_WaypointIndex"); 45 | waypointParent = (Transform)data.Get("_BTD_Waypoint"); 46 | 47 | if(waypointParent == null) 48 | { 49 | return NodeStatus.FAILURE; 50 | } 51 | Waypoints waypoints = waypointParent.GetComponent(); 52 | 53 | if(!waypoints.circular && index == waypointParent.childCount - 1) 54 | { 55 | backwards = true; 56 | } 57 | if(!waypoints.circular && index == 0) 58 | { 59 | backwards = false; 60 | } 61 | 62 | if(backwards) 63 | { 64 | index--; 65 | } 66 | else 67 | { 68 | index++; 69 | } 70 | 71 | if(index >= waypointParent.childCount) 72 | { 73 | index = 0; 74 | } 75 | if(index < 0) 76 | { 77 | index = waypointParent.childCount - 1; 78 | } 79 | 80 | Transform target = waypointParent.GetChild(index); 81 | data.Add(entry, target); 82 | data.Add("_BTD_WaypointIndex", index); 83 | 84 | if(target == null) 85 | { 86 | return NodeStatus.FAILURE; 87 | } 88 | 89 | return NodeStatus.SUCCESS; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/GetNextWaypoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 257df58c8a7a5ac4ea7cfd13b87ea39d 3 | timeCreated: 1506718930 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/MoveToTarget.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | #if UNITY_5_5_OR_NEWER 4 | using UnityEngine.AI; 5 | #endif 6 | using NodeEditorFramework; 7 | 8 | namespace BehavorTreeDesigner 9 | { 10 | [Node(false, "Behavior/Action/MoveToTarget")] 11 | public class MoveToTarget : BaseBehaviorNode 12 | { 13 | [SerializeField] 14 | private string entry = ""; 15 | [SerializeField] 16 | private float stopDist = 0; 17 | 18 | public override Node Create(Vector2 pos) 19 | { 20 | MoveToTarget node = CreateInstance(); 21 | base.Init(node); 22 | 23 | node.rect = new Rect(pos.x, pos.y, 100, 95); 24 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 25 | 26 | return node; 27 | } 28 | 29 | protected override void NodeGUI() 30 | { 31 | GUILayout.Label("Entry:"); 32 | entry = EditorGUILayout.TextField(entry); 33 | GUILayout.Label("Stop distance:"); 34 | stopDist = EditorGUILayout.FloatField(stopDist, GUILayout.Width(40)); 35 | } 36 | 37 | public override NodeStatus Tick(BehaviorBlackboard data) 38 | { 39 | Transform player = (Transform)data.Get("_BTD_Agent"); 40 | Transform target = ((Transform)data.Get(entry)); 41 | NavMeshAgent agent = player.GetComponent(); 42 | Vector3 playerPos = player.position; 43 | 44 | if(agent == null) 45 | { 46 | Debug.LogError("Behavor Tree Designer\nNo NavMeshAgent component found on node: " + this.name); 47 | return NodeStatus.ERROR; 48 | } 49 | 50 | if(target == null) 51 | { 52 | return NodeStatus.ERROR; 53 | } 54 | 55 | Vector3 targetPos = target.position; 56 | agent.stoppingDistance = stopDist; 57 | agent.destination = targetPos; 58 | if(Vector3.Distance(targetPos, playerPos) < stopDist) 59 | { 60 | return NodeStatus.SUCCESS; 61 | } 62 | else if(agent.hasPath) 63 | { 64 | return NodeStatus.RUNNING; 65 | } 66 | else 67 | { 68 | return NodeStatus.FAILURE; 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Actions/MoveToTarget.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ccab586a2914c64493b34a10793d214 3 | timeCreated: 1506718410 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/BaseBehaviorNode.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections.Generic; 4 | using NodeEditorFramework; 5 | 6 | namespace BehavorTreeDesigner 7 | { 8 | [Node(true, "Behavior/Base Node")] 9 | public abstract class BaseBehaviorNode : Node 10 | { 11 | [SerializeField] 12 | protected string Id; 13 | [SerializeField] 14 | protected Texture tex; 15 | [SerializeField] 16 | protected Guid guid; 17 | 18 | public abstract NodeStatus Tick(BehaviorBlackboard data); 19 | 20 | public virtual void Init(BehaviorBlackboard data) 21 | { 22 | List nodes = this.Outputs; 23 | 24 | foreach(NodeOutput node in nodes) 25 | { 26 | if(node.connections.Count == 0) 27 | continue; 28 | 29 | ((BaseBehaviorNode)(node.connections[0].body)).Init(data); 30 | } 31 | guid = Guid.NewGuid(); 32 | } 33 | 34 | protected void Init(BaseBehaviorNode node) 35 | { 36 | node.name = this.GetType().Name; 37 | node.Id = node.name; 38 | node.tex = (Texture)Resources.Load("BehavorIcons/" + node.Id); 39 | } 40 | 41 | protected override void NodeGUI() 42 | { 43 | GUILayout.BeginHorizontal(); 44 | GUILayout.FlexibleSpace(); 45 | GUILayout.Label(tex); 46 | GUILayout.FlexibleSpace(); 47 | GUILayout.EndHorizontal(); 48 | } 49 | 50 | public override string GetID{get { return Id; } } 51 | } 52 | 53 | public enum NodeStatus 54 | { 55 | SUCCESS, 56 | FAILURE, 57 | RUNNING, 58 | ERROR 59 | } 60 | 61 | public enum EntryType 62 | { 63 | CLASS, 64 | BOOL, 65 | INTEGER, 66 | FLOAT 67 | } 68 | 69 | public class BehaveType : IConnectionTypeDeclaration 70 | { 71 | public string Identifier { get { return "Behave"; } } 72 | public Type Type { get { return typeof(void); } } // type to pass 73 | public Color Color { get { return Color.green; } } 74 | public string InKnobTex { get { return "Textures/In_Knob.png"; } } 75 | public string OutKnobTex { get { return "Textures/Out_Knob.png"; } } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/BaseBehaviorNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc28a88ab99e51f439b38b0d69851a20 3 | timeCreated: 1484370148 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdef681f460452c4d85f91d632255dd7 3 | folderAsset: yes 4 | timeCreated: 1484421000 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Parallel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | using System.Collections.Generic; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Composite/Parallel")] 8 | public class Parallel : BaseBehaviorNode 9 | { 10 | public override Node Create(Vector2 pos) 11 | { 12 | Parallel node = CreateInstance(); 13 | base.Init(node); 14 | 15 | node.rect = new Rect(pos.x, pos.y, 140, 80); 16 | node.CreateInput("In", "Behave", NodeSide.Top, 70); 17 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 20); 18 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 70); 19 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 120); 20 | 21 | return node; 22 | } 23 | 24 | public override NodeStatus Tick(BehaviorBlackboard data) 25 | { 26 | List nodes = this.Outputs; 27 | NodeStatus[] childstatus = new NodeStatus[nodes.Count]; 28 | int count = 0; 29 | bool running = false; 30 | bool fail = false; 31 | 32 | for(int i = 0; i < nodes.Count; i++) 33 | { 34 | if(nodes[i].connections.Count == 0) 35 | continue; 36 | 37 | count ++; 38 | childstatus[i] = ((BaseBehaviorNode)(nodes[i].connections[0].body)).Tick(data); 39 | } 40 | 41 | if(count == 0) 42 | { 43 | Debug.LogError("Behavor Tree Designer\nNo output node is connected on node: " + this.name); 44 | return NodeStatus.ERROR; 45 | } 46 | 47 | foreach(NodeStatus status in childstatus) 48 | { 49 | if(status == NodeStatus.ERROR) 50 | return NodeStatus.ERROR; 51 | if(status == NodeStatus.RUNNING) 52 | running = true; 53 | if(status == NodeStatus.FAILURE) 54 | fail = true; 55 | } 56 | if(running) 57 | return NodeStatus.RUNNING; 58 | else if(fail) 59 | return NodeStatus.FAILURE; 60 | else 61 | return NodeStatus.RUNNING; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Parallel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7cd795dd35284f469ce15fb2bbab591 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Random.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | using System.Collections.Generic; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Composite/Random")] 8 | public class Random : BaseBehaviorNode 9 | { 10 | public override Node Create(Vector2 pos) 11 | { 12 | Random node = CreateInstance(); 13 | base.Init(node); 14 | 15 | node.rect = new Rect(pos.x, pos.y, 140, 80); 16 | node.CreateInput("In", "Behave", NodeSide.Top, 70); 17 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 20); 18 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 70); 19 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 120); 20 | 21 | return node; 22 | } 23 | 24 | public override NodeStatus Tick(BehaviorBlackboard data) 25 | { 26 | List nodes = this.Outputs; 27 | BaseBehaviorNode[] nodeArray = new BaseBehaviorNode[3]; 28 | int count = 0; 29 | 30 | foreach(NodeOutput node in nodes) 31 | { 32 | if(node.connections.Count == 0) 33 | continue; 34 | 35 | nodeArray[count] = (BaseBehaviorNode)(node.connections[0].body); 36 | count ++; 37 | } 38 | 39 | if(count == 0) 40 | { 41 | Debug.LogError("Behavor Tree Designer\nNo output node is connected on node: " + this.name); 42 | return NodeStatus.ERROR; 43 | } 44 | 45 | int rand = UnityEngine.Random.Range(0, count); 46 | NodeStatus childstatus = nodeArray[rand].Tick(data); 47 | return childstatus; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Random.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72f74cc4b48df424aa5d2ecae2719889 3 | timeCreated: 1484706523 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Selector.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | using System.Collections.Generic; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Composite/Selector")] 8 | public class Selector : BaseBehaviorNode 9 | { 10 | public override Node Create(Vector2 pos) 11 | { 12 | Selector node = CreateInstance(); 13 | base.Init(node); 14 | 15 | node.rect = new Rect(pos.x, pos.y, 140, 80); 16 | node.CreateInput("In", "Behave", NodeSide.Top, 70); 17 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 20); 18 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 70); 19 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 120); 20 | 21 | return node; 22 | } 23 | 24 | public override NodeStatus Tick(BehaviorBlackboard data) 25 | { 26 | List nodes = this.Outputs; 27 | int count = 0; 28 | 29 | foreach(NodeOutput node in nodes) 30 | { 31 | if(node.connections.Count == 0) 32 | continue; 33 | 34 | NodeStatus childstatus = ((BaseBehaviorNode)(node.connections[0].body)).Tick(data); 35 | count++; 36 | if(childstatus != NodeStatus.FAILURE) 37 | { 38 | return childstatus; 39 | } 40 | } 41 | 42 | if(count == 0) 43 | { 44 | Debug.LogError("Behavor Tree Designer\nNo output node is connected on node: " + this.name); 45 | return NodeStatus.ERROR; 46 | } 47 | 48 | return NodeStatus.FAILURE; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Selector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5684e0be99ab5954299a88851c2786a0 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Sequence.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | using System.Collections.Generic; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Composite/Sequence")] 8 | public class Sequence : BaseBehaviorNode 9 | { 10 | public override Node Create(Vector2 pos) 11 | { 12 | Sequence node = CreateInstance(); 13 | base.Init(node); 14 | 15 | node.rect = new Rect(pos.x, pos.y, 140, 80); 16 | node.CreateInput("In", "Behave", NodeSide.Top, 70); 17 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 20); 18 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 70); 19 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 120); 20 | 21 | return node; 22 | } 23 | 24 | public override NodeStatus Tick(BehaviorBlackboard data) 25 | { 26 | List nodes = this.Outputs; 27 | int count = 0; 28 | 29 | foreach(NodeOutput node in nodes) 30 | { 31 | if(node.connections.Count == 0) 32 | continue; 33 | 34 | NodeStatus childstatus = ((BaseBehaviorNode)(node.connections[0].body)).Tick(data); 35 | count ++; 36 | if(childstatus != NodeStatus.SUCCESS) 37 | { 38 | return childstatus; 39 | } 40 | } 41 | 42 | if(count == 0) 43 | { 44 | Debug.LogError("Behavor Tree Designer\nNo output node is connected on node: " + this.name); 45 | return NodeStatus.ERROR; 46 | } 47 | 48 | return NodeStatus.SUCCESS; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Composites/Sequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68e2644f31a19894b9124c1f5966050c 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4ef4c3c1f57d08428196ed289a69117 3 | folderAsset: yes 4 | timeCreated: 1484432204 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug/FixedValue.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Debug/FixedValue")] 8 | public class FixedValue : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private NodeStatus nodeStatus = NodeStatus.SUCCESS; 12 | 13 | public override Node Create(Vector2 pos) 14 | { 15 | FixedValue node = CreateInstance(); 16 | base.Init(node); 17 | 18 | node.rect = new Rect(pos.x, pos.y, 100, 80); 19 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 20 | 21 | return node; 22 | } 23 | 24 | protected override void NodeGUI() 25 | { 26 | nodeStatus = (NodeStatus)EditorGUILayout.EnumPopup(nodeStatus); 27 | } 28 | 29 | public override NodeStatus Tick(BehaviorBlackboard data) 30 | { 31 | return nodeStatus; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug/FixedValue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 393f3453ab1c9dc488958db50cdc293b 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug/Logger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | 4 | namespace BehavorTreeDesigner 5 | { 6 | [Node(false, "Behavior/Debug/Logger")] 7 | public class Logger : BaseBehaviorNode 8 | { 9 | public override Node Create(Vector2 pos) 10 | { 11 | Logger node = CreateInstance(); 12 | base.Init(node); 13 | 14 | node.rect = new Rect(pos.x, pos.y, 100, 80); 15 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 16 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 50); 17 | 18 | return node; 19 | } 20 | 21 | public override NodeStatus Tick(BehaviorBlackboard data) 22 | { 23 | if(this.Outputs[0].connections.Count == 0) 24 | { 25 | Debug.LogError("Behavor Tree Designer\nOutput node is not connected on node: " + this.name); 26 | return NodeStatus.ERROR; 27 | } 28 | 29 | BaseBehaviorNode node = (BaseBehaviorNode)this.Outputs[0].connections[0].body; 30 | NodeStatus status = node.Tick(data); 31 | 32 | Debug.Log("Behavor Tree Designer Logger\nComing from: " + node.name + ". Result: " + status.ToString()); 33 | 34 | return status; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug/Logger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 956fc5ef394a11b488ebbb14088f56d1 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug/ReadEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Debug/ReadEntry")] 8 | public class ReadEntry : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private string entry = ""; 12 | [SerializeField] 13 | private bool global = false; 14 | 15 | public override Node Create(Vector2 pos) 16 | { 17 | ReadEntry node = CreateInstance(); 18 | base.Init(node); 19 | 20 | node.rect = new Rect(pos.x, pos.y, 100, 95); 21 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 22 | 23 | return node; 24 | } 25 | 26 | protected override void NodeGUI() 27 | { 28 | GUILayout.Label("Entry:"); 29 | entry = EditorGUILayout.TextField(entry); 30 | GUILayout.Label("Global:"); 31 | global = EditorGUILayout.Toggle(global); 32 | } 33 | 34 | public override NodeStatus Tick(BehaviorBlackboard data) 35 | { 36 | object classObj; 37 | if(global) 38 | { 39 | classObj = data.GetGlobal(entry); 40 | } 41 | else 42 | { 43 | classObj = data.Get(entry); 44 | } 45 | if(classObj == null) 46 | classObj = "null"; 47 | Debug.Log("Behavor Tree Designer Logger\nEntry: " + classObj); 48 | return NodeStatus.SUCCESS; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Debug/ReadEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3378e5b29a6171d4f954a001a5944675 3 | timeCreated: 1486702653 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87c064aff4f16ea40895ad1f8a209c1f 3 | folderAsset: yes 4 | timeCreated: 1484420929 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators/Inverter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | 4 | namespace BehavorTreeDesigner 5 | { 6 | [Node(false, "Behavior/Decorator/Inverter")] 7 | public class Inverter : BaseBehaviorNode 8 | { 9 | public override Node Create(Vector2 pos) 10 | { 11 | Inverter node = CreateInstance(); 12 | base.Init(node); 13 | 14 | node.rect = new Rect(pos.x, pos.y, 100, 80); 15 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 16 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 50); 17 | 18 | return node; 19 | } 20 | 21 | public override NodeStatus Tick(BehaviorBlackboard data) 22 | { 23 | if(this.Outputs[0].connections.Count == 0) 24 | { 25 | Debug.LogError("Behavor Tree Designer\nOutput node is not connected on node: " + this.name); 26 | return NodeStatus.ERROR; 27 | } 28 | 29 | BaseBehaviorNode node = (BaseBehaviorNode)this.Outputs[0].connections[0].body; 30 | NodeStatus status = node.Tick(data); 31 | 32 | if(status == NodeStatus.SUCCESS) 33 | { 34 | status = NodeStatus.FAILURE; 35 | } 36 | else if(status == NodeStatus.FAILURE) 37 | { 38 | status = NodeStatus.SUCCESS; 39 | } 40 | return status; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators/Inverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cddcf596259fe254e8955cc6d8f29971 3 | timeCreated: 1484511714 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators/Repeater.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Decorator/Repeater")] 8 | public class Repeater : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private int repNumber; 12 | 13 | public override Node Create(Vector2 pos) 14 | { 15 | Repeater node = CreateInstance(); 16 | base.Init(node); 17 | 18 | node.rect = new Rect(pos.x, pos.y, 100, 95); 19 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 20 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 50); 21 | 22 | return node; 23 | } 24 | 25 | protected override void NodeGUI() 26 | { 27 | base.NodeGUI(); 28 | GUILayout.BeginHorizontal(); 29 | GUILayout.Label("Repeats: "); 30 | repNumber = EditorGUILayout.IntField(repNumber, GUILayout.Width(25)); 31 | GUILayout.EndHorizontal(); 32 | } 33 | 34 | public override void Init(BehaviorBlackboard data) 35 | { 36 | base.Init(data); 37 | data.Add(guid.ToString(), 0); 38 | } 39 | 40 | public override NodeStatus Tick(BehaviorBlackboard data) 41 | { 42 | if(this.Outputs[0].connections.Count == 0) 43 | { 44 | Debug.LogError("Behavor Tree Designer\nOutput node is not connected on node: " + this.name); 45 | return NodeStatus.ERROR; 46 | } 47 | 48 | BaseBehaviorNode node = (BaseBehaviorNode)this.Outputs[0].connections[0].body; 49 | NodeStatus status = NodeStatus.SUCCESS; 50 | int rep = (int)data.Get(guid.ToString()); 51 | 52 | status = node.Tick(data); 53 | 54 | if(status == NodeStatus.RUNNING) 55 | { 56 | return status; 57 | } 58 | 59 | rep += 1; 60 | 61 | if(rep < repNumber) 62 | { 63 | status = NodeStatus.RUNNING; 64 | data.Add(guid.ToString(), rep); 65 | } 66 | else 67 | { 68 | data.Add(guid.ToString(), 0); 69 | } 70 | 71 | return status; 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators/Repeater.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6db77d6272e75d04d9d690db72f6933f 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators/Wait.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Decorator/Wait")] 8 | public class Wait : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private float waitTime; 12 | private bool start = true; 13 | 14 | public override Node Create(Vector2 pos) 15 | { 16 | Wait node = CreateInstance(); 17 | base.Init(node); 18 | 19 | node.rect = new Rect(pos.x, pos.y, 100, 80); 20 | node.CreateInput("In", "Behave", NodeSide.Top, 50); 21 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 50); 22 | 23 | return node; 24 | } 25 | 26 | protected override void NodeGUI() 27 | { 28 | GUILayout.Label("Wait time(s): "); 29 | waitTime = EditorGUILayout.FloatField(waitTime, GUILayout.Width(50)); 30 | } 31 | 32 | public override void Init(BehaviorBlackboard data) 33 | { 34 | base.Init(data); 35 | data.Add(guid.ToString(), 0.0f); 36 | } 37 | 38 | public override NodeStatus Tick(BehaviorBlackboard data) 39 | { 40 | if(this.Outputs[0].connections.Count == 0) 41 | { 42 | Debug.LogError("Behavor Tree Designer\nOutput node is not connected on node: " + this.name); 43 | return NodeStatus.ERROR; 44 | } 45 | 46 | BaseBehaviorNode node = (BaseBehaviorNode)this.Outputs[0].connections[0].body; 47 | 48 | if(start) 49 | { 50 | data.Add(guid.ToString(), Time.time); 51 | } 52 | 53 | float time = (float)data.Get(guid.ToString()); 54 | 55 | if(time + waitTime > Time.time) 56 | { 57 | start = false; 58 | return NodeStatus.RUNNING; 59 | } 60 | else 61 | { 62 | start = true; 63 | return node.Tick(data); 64 | } 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Decorators/Wait.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8ddd327ceef2f445b9ed4f32041b140 3 | timeCreated: 1484708100 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Root.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using NodeEditorFramework; 3 | 4 | namespace BehavorTreeDesigner 5 | { 6 | [Node(false, "Behavior/Root")] 7 | public class Root : BaseBehaviorNode 8 | { 9 | public override Node Create(Vector2 pos) 10 | { 11 | Root node = CreateInstance(); 12 | base.Init(node); 13 | 14 | node.rect = new Rect(pos.x, pos.y, 100, 80); 15 | node.CreateOutput("Out", "Behave", NodeSide.Bottom, 50); 16 | 17 | return node; 18 | } 19 | 20 | public override NodeStatus Tick(BehaviorBlackboard data) 21 | { 22 | if(this.Outputs[0].connections.Count == 0) 23 | { 24 | Debug.LogError("Behavor Tree Designer\nRoot node is not connected."); 25 | return NodeStatus.ERROR; 26 | } 27 | 28 | BaseBehaviorNode node = (BaseBehaviorNode)this.Outputs[0].connections[0].body; 29 | NodeStatus status = node.Tick(data); 30 | 31 | if(status == NodeStatus.ERROR) 32 | { 33 | Debug.Log("Behavor Tree Designer\nError status returned."); 34 | } 35 | 36 | return status; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Root.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e397ec12cba520f419eae7315beb700e 3 | timeCreated: 1484512817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Subtree.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using NodeEditorFramework; 4 | 5 | namespace BehavorTreeDesigner 6 | { 7 | [Node(false, "Behavior/Subtree")] 8 | public class Subtree : BaseBehaviorNode 9 | { 10 | [SerializeField] 11 | private BehaviorCanvas subTree; 12 | private BaseBehaviorNode subRoot; 13 | 14 | public override Node Create(Vector2 pos) 15 | { 16 | Subtree node = CreateInstance(); 17 | base.Init(node); 18 | 19 | node.rect = new Rect(pos.x, pos.y, 180, 95); 20 | node.CreateInput("In", "Behave", NodeSide.Top, 90); 21 | 22 | return node; 23 | } 24 | 25 | protected override void NodeGUI() 26 | { 27 | GUILayout.Label("Behavior Tree:"); 28 | subTree = (BehaviorCanvas)EditorGUILayout.ObjectField(subTree, typeof(BehaviorCanvas), true); 29 | } 30 | 31 | public override void Init(BehaviorBlackboard data) 32 | { 33 | base.Init(data); 34 | if(subTree == null) 35 | { 36 | Debug.LogError("Behavor Tree Designer\nNo subtree assigned!"); 37 | return; 38 | } 39 | subRoot = subTree.GetRootNode(); 40 | subRoot.Init(data); 41 | } 42 | 43 | public override NodeStatus Tick(BehaviorBlackboard data) 44 | { 45 | return subRoot.Tick(data); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Subtree.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82ac4c35dcee6a24580cbe2990ea1e1a 3 | timeCreated: 1506787746 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/BehaviorTreeDesigner/Scripts/Nodes/Template.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using NodeEditorFramework; 4 | 5 | // This namespace should most likely be removed for any custom nodes. 6 | namespace BehavorTreeDesigner 7 | { 8 | // This tells the editor if the node is hidden in the editor node dropdown and which path it will have. 9 | // NOTE: Needs to be changed to false to show up! 10 | [Node(true, "Behavior/Template")] 11 | public class Template : BaseBehaviorNode 12 | { 13 | // All fields that are visible in the node UI need to have the [SerializeField] tag. 14 | [SerializeField] 15 | private string exampleString; 16 | 17 | // Required function. Creates the node in the node editor. 18 | public override Node Create(Vector2 pos) 19 | { 20 | // This needs to use the same classas the script. 21 | Template node = CreateInstance