├── .gitignore
├── .idea
├── .idea.BehaviorTreeEditor
│ └── .idea
│ │ ├── .gitignore
│ │ ├── encodings.xml
│ │ ├── indexLayout.xml
│ │ └── vcs.xml
└── .idea.BehaviourTreeEditor
│ └── .idea
│ ├── .gitignore
│ ├── encodings.xml
│ ├── indexLayout.xml
│ └── vcs.xml
├── Assets
├── BTCore.meta
├── BTCore
│ ├── Data.meta
│ ├── Data
│ │ ├── TestBothAbort.json
│ │ ├── TestBothAbort.json.meta
│ │ ├── TestExternalNode.json
│ │ ├── TestExternalNode.json.meta
│ │ ├── TestGroupStickNoteComment.json
│ │ ├── TestGroupStickNoteComment.json.meta
│ │ ├── TestLowerPriorityAbort.json
│ │ ├── TestLowerPriorityAbort.json.meta
│ │ ├── TestRandom.json
│ │ ├── TestRandom.json.meta
│ │ ├── TestSelfAbort.json
│ │ └── TestSelfAbort.json.meta
│ ├── Editor.meta
│ ├── Editor
│ │ ├── BTEditor.asmdef
│ │ ├── BTEditor.asmdef.meta
│ │ ├── BTEditorDef.cs
│ │ ├── BTEditorDef.cs.meta
│ │ ├── BTEditorWindow.cs
│ │ ├── BTEditorWindow.cs.meta
│ │ ├── BTNodeView.cs
│ │ ├── BTNodeView.cs.meta
│ │ ├── BTUndoRedo.cs
│ │ ├── BTUndoRedo.cs.meta
│ │ ├── BTView.cs
│ │ ├── BTView.cs.meta
│ │ ├── BlackboardView.cs
│ │ ├── BlackboardView.cs.meta
│ │ ├── ColorGroup.cs
│ │ ├── ColorGroup.cs.meta
│ │ ├── DoubleClickNode.cs
│ │ ├── DoubleClickNode.cs.meta
│ │ ├── IDataSerializable.cs
│ │ ├── IDataSerializable.cs.meta
│ │ ├── Inspectors.meta
│ │ ├── Inspectors
│ │ │ ├── Actions.meta
│ │ │ ├── Actions
│ │ │ │ ├── LogInspector.cs
│ │ │ │ ├── LogInspector.cs.meta
│ │ │ │ ├── WaitInspector.cs
│ │ │ │ └── WaitInspector.cs.meta
│ │ │ ├── BTNodeInspector.cs
│ │ │ ├── BTNodeInspector.cs.meta
│ │ │ ├── BlackboardInspector.cs
│ │ │ ├── BlackboardInspector.cs.meta
│ │ │ ├── BlackboardValueInspector.cs
│ │ │ ├── BlackboardValueInspector.cs.meta
│ │ │ ├── Composites.meta
│ │ │ ├── Composites
│ │ │ │ ├── CompositeInspector.cs
│ │ │ │ ├── CompositeInspector.cs.meta
│ │ │ │ ├── RandomSelectorInspector.cs
│ │ │ │ ├── RandomSelectorInspector.cs.meta
│ │ │ │ ├── RandomSequenceInspector.cs
│ │ │ │ ├── RandomSequenceInspector.cs.meta
│ │ │ │ ├── SelectorInspector.cs
│ │ │ │ ├── SelectorInspector.cs.meta
│ │ │ │ ├── SequenceInspector.cs
│ │ │ │ └── SequenceInspector.cs.meta
│ │ │ ├── Conditions.meta
│ │ │ ├── Conditions
│ │ │ │ ├── IsKeyDownInspector.cs
│ │ │ │ ├── IsKeyDownInspector.cs.meta
│ │ │ │ ├── ProbabilityInspector.cs
│ │ │ │ └── ProbabilityInspector.cs.meta
│ │ │ ├── Decorators.meta
│ │ │ ├── Decorators
│ │ │ │ ├── RepeaterInspector.cs
│ │ │ │ └── RepeaterInspector.cs.meta
│ │ │ ├── Externals.meta
│ │ │ ├── Externals
│ │ │ │ ├── ExternalActionInspector.cs
│ │ │ │ ├── ExternalActionInspector.cs.meta
│ │ │ │ ├── ExternalConditionInspector.cs
│ │ │ │ ├── ExternalConditionInspector.cs.meta
│ │ │ │ ├── ExternalNodeInspector.cs
│ │ │ │ └── ExternalNodeInspector.cs.meta
│ │ │ ├── InspectorBase.cs
│ │ │ ├── InspectorBase.cs.meta
│ │ │ ├── MonoBehaviours.meta
│ │ │ ├── MonoBehaviours
│ │ │ │ ├── BehaviorTreeInspector.cs
│ │ │ │ └── BehaviorTreeInspector.cs.meta
│ │ │ ├── SharedValueInspector.cs
│ │ │ └── SharedValueInspector.cs.meta
│ │ ├── NodeInspectorView.cs
│ │ ├── NodeInspectorView.cs.meta
│ │ ├── NodePort.cs
│ │ ├── NodePort.cs.meta
│ │ ├── NodeSearchWindow.cs
│ │ ├── NodeSearchWindow.cs.meta
│ │ ├── Resources.meta
│ │ ├── Resources
│ │ │ ├── ConditionalAbortBothIcon.png
│ │ │ ├── ConditionalAbortBothIcon.png.meta
│ │ │ ├── ConditionalAbortLowerPriorityIcon.png
│ │ │ ├── ConditionalAbortLowerPriorityIcon.png.meta
│ │ │ ├── ConditionalAbortSelfIcon.png
│ │ │ └── ConditionalAbortSelfIcon.png.meta
│ │ ├── SplitView.cs
│ │ ├── SplitView.cs.meta
│ │ ├── UIBuilder.meta
│ │ └── UIBuilder
│ │ │ ├── BTEditorWindow.uxml
│ │ │ ├── BTEditorWindow.uxml.meta
│ │ │ ├── BTEditorWindowStyle.uss
│ │ │ ├── BTEditorWindowStyle.uss.meta
│ │ │ ├── BTNodeView.uxml
│ │ │ ├── BTNodeView.uxml.meta
│ │ │ ├── BTNodeViewStyle.uss
│ │ │ ├── BTNodeViewStyle.uss.meta
│ │ │ ├── BTViewStyle.uss
│ │ │ └── BTViewStyle.uss.meta
│ ├── Runtime.Unity.meta
│ ├── Runtime.Unity
│ │ ├── BTRuntime.Unity.asmdef
│ │ ├── BTRuntime.Unity.asmdef.meta
│ │ ├── BehaviorTree.cs
│ │ ├── BehaviorTree.cs.meta
│ │ ├── Conditions.meta
│ │ └── Conditions
│ │ │ ├── IsKeyDown.cs
│ │ │ └── IsKeyDown.cs.meta
│ ├── Runtime.meta
│ └── Runtime
│ │ ├── Actions.meta
│ │ ├── Actions
│ │ ├── Action.cs
│ │ ├── Action.cs.meta
│ │ ├── Log.cs
│ │ ├── Log.cs.meta
│ │ ├── Wait.cs
│ │ └── Wait.cs.meta
│ │ ├── Attributes.meta
│ │ ├── Attributes
│ │ ├── NodeInspectorAttribute.cs
│ │ └── NodeInspectorAttribute.cs.meta
│ │ ├── BTData.cs
│ │ ├── BTData.cs.meta
│ │ ├── BTDef.cs
│ │ ├── BTDef.cs.meta
│ │ ├── BTEx.cs
│ │ ├── BTEx.cs.meta
│ │ ├── BTLogger.cs
│ │ ├── BTLogger.cs.meta
│ │ ├── BTNode.cs
│ │ ├── BTNode.cs.meta
│ │ ├── BTRuntime.asmdef
│ │ ├── BTRuntime.asmdef.meta
│ │ ├── BTSettings.cs
│ │ ├── BTSettings.cs.meta
│ │ ├── BTree.cs
│ │ ├── BTree.cs.meta
│ │ ├── Blackboards.meta
│ │ ├── Blackboards
│ │ ├── Blackboard.cs
│ │ ├── Blackboard.cs.meta
│ │ ├── BlackboardValue.cs
│ │ ├── BlackboardValue.cs.meta
│ │ ├── PresetBlackboardValue.cs
│ │ └── PresetBlackboardValue.cs.meta
│ │ ├── Composites.meta
│ │ ├── Composites
│ │ ├── Composite.cs
│ │ ├── Composite.cs.meta
│ │ ├── Parallel.cs
│ │ ├── Parallel.cs.meta
│ │ ├── RandomSelector.cs
│ │ ├── RandomSelector.cs.meta
│ │ ├── RandomSequence.cs
│ │ ├── RandomSequence.cs.meta
│ │ ├── Selector.cs
│ │ ├── Selector.cs.meta
│ │ ├── Sequence.cs
│ │ └── Sequence.cs.meta
│ │ ├── Conditions.meta
│ │ ├── Conditions
│ │ ├── Condition.cs
│ │ ├── Condition.cs.meta
│ │ ├── RandomProbability.cs
│ │ └── RandomProbability.cs.meta
│ │ ├── Decorators.meta
│ │ ├── Decorators
│ │ ├── Decorator.cs
│ │ ├── Decorator.cs.meta
│ │ ├── Failure.cs
│ │ ├── Failure.cs.meta
│ │ ├── Inverter.cs
│ │ ├── Inverter.cs.meta
│ │ ├── Repeater.cs
│ │ ├── Repeater.cs.meta
│ │ ├── Success.cs
│ │ ├── Success.cs.meta
│ │ ├── UntilSuccess.cs
│ │ └── UntilSuccess.cs.meta
│ │ ├── EntryNode.cs
│ │ ├── EntryNode.cs.meta
│ │ ├── Externals.meta
│ │ ├── Externals
│ │ ├── ExternalAction.cs
│ │ ├── ExternalAction.cs.meta
│ │ ├── ExternalCondition.cs
│ │ ├── ExternalCondition.cs.meta
│ │ ├── IExternalNode.cs
│ │ └── IExternalNode.cs.meta
│ │ ├── INode.cs
│ │ ├── INode.cs.meta
│ │ ├── OtherNodes.meta
│ │ ├── OtherNodes
│ │ ├── GroupNode.cs
│ │ ├── GroupNode.cs.meta
│ │ ├── StickNoteNode.cs
│ │ └── StickNoteNode.cs.meta
│ │ ├── ParentNode.cs
│ │ ├── ParentNode.cs.meta
│ │ ├── SharedValue.cs
│ │ └── SharedValue.cs.meta
├── Examples.meta
├── Examples
│ ├── AbortType.meta
│ ├── AbortType
│ │ ├── ActionAttack.cs
│ │ ├── ActionAttack.cs.meta
│ │ ├── ActionSkill.cs
│ │ ├── ActionSkill.cs.meta
│ │ ├── ActionWait.cs
│ │ ├── ActionWait.cs.meta
│ │ ├── ActionWork.cs
│ │ ├── ActionWork.cs.meta
│ │ ├── ConditionHP.cs
│ │ ├── ConditionHP.cs.meta
│ │ ├── ConditionMP.cs
│ │ └── ConditionMP.cs.meta
│ ├── ExternalNode.meta
│ └── ExternalNode
│ │ ├── AIAgent.cs
│ │ ├── AIAgent.cs.meta
│ │ ├── AIService.cs
│ │ ├── AIService.cs.meta
│ │ ├── ExternalNodeTree.cs
│ │ ├── ExternalNodeTree.cs.meta
│ │ ├── MyAction.cs
│ │ ├── MyAction.cs.meta
│ │ ├── MyCondition.cs
│ │ └── MyCondition.cs.meta
├── Plugins.meta
├── Plugins
│ ├── Sirenix.meta
│ └── Sirenix
│ │ ├── Assemblies.meta
│ │ ├── Assemblies
│ │ ├── NoEditor.meta
│ │ ├── NoEditor
│ │ │ ├── Sirenix.Serialization.dll
│ │ │ ├── Sirenix.Serialization.dll.meta
│ │ │ ├── Sirenix.Utilities.dll
│ │ │ └── Sirenix.Utilities.dll.meta
│ │ ├── NoEmitAndNoEditor.meta
│ │ ├── NoEmitAndNoEditor
│ │ │ ├── Sirenix.Serialization.dll
│ │ │ ├── Sirenix.Serialization.dll.meta
│ │ │ ├── Sirenix.Utilities.dll
│ │ │ └── Sirenix.Utilities.dll.meta
│ │ ├── Sirenix.OdinInspector.Attributes.dll
│ │ ├── Sirenix.OdinInspector.Attributes.dll.meta
│ │ ├── Sirenix.OdinInspector.Attributes.xml
│ │ ├── Sirenix.OdinInspector.Attributes.xml.meta
│ │ ├── Sirenix.OdinInspector.Editor.dll
│ │ ├── Sirenix.OdinInspector.Editor.dll.meta
│ │ ├── Sirenix.OdinInspector.Editor.xml
│ │ ├── Sirenix.OdinInspector.Editor.xml.meta
│ │ ├── Sirenix.OdinValidator.Editor.dll
│ │ ├── Sirenix.OdinValidator.Editor.dll.meta
│ │ ├── Sirenix.OdinValidator.Editor.xml
│ │ ├── Sirenix.OdinValidator.Editor.xml.meta
│ │ ├── Sirenix.Serialization.Config.dll
│ │ ├── Sirenix.Serialization.Config.dll.meta
│ │ ├── Sirenix.Serialization.Config.xml
│ │ ├── Sirenix.Serialization.Config.xml.meta
│ │ ├── Sirenix.Serialization.dll
│ │ ├── Sirenix.Serialization.dll.meta
│ │ ├── Sirenix.Serialization.xml
│ │ ├── Sirenix.Serialization.xml.meta
│ │ ├── Sirenix.Utilities.Editor.dll
│ │ ├── Sirenix.Utilities.Editor.dll.meta
│ │ ├── Sirenix.Utilities.Editor.xml
│ │ ├── Sirenix.Utilities.Editor.xml.meta
│ │ ├── Sirenix.Utilities.dll
│ │ ├── Sirenix.Utilities.dll.meta
│ │ ├── Sirenix.Utilities.xml
│ │ ├── Sirenix.Utilities.xml.meta
│ │ ├── link.xml
│ │ └── link.xml.meta
│ │ ├── Demos.meta
│ │ ├── Odin Inspector.meta
│ │ ├── Odin Inspector
│ │ ├── Assets.meta
│ │ ├── Assets
│ │ │ ├── Editor.meta
│ │ │ └── Editor
│ │ │ │ ├── Bootstrap License.txt
│ │ │ │ ├── Bootstrap License.txt.meta
│ │ │ │ ├── ConfigData.bytes
│ │ │ │ ├── ConfigData.bytes.meta
│ │ │ │ ├── OdinPathLookup.asset
│ │ │ │ ├── OdinPathLookup.asset.meta
│ │ │ │ ├── SdfIconAtlas.png
│ │ │ │ └── SdfIconAtlas.png.meta
│ │ ├── Config.meta
│ │ ├── Config
│ │ │ ├── Editor.meta
│ │ │ ├── Editor
│ │ │ │ ├── GeneralDrawerConfig.asset
│ │ │ │ ├── GeneralDrawerConfig.asset.meta
│ │ │ │ ├── InspectorConfig.asset
│ │ │ │ ├── InspectorConfig.asset.meta
│ │ │ │ ├── OdinModuleConfig.asset
│ │ │ │ └── OdinModuleConfig.asset.meta
│ │ │ ├── Resources.meta
│ │ │ └── Resources
│ │ │ │ ├── Sirenix.meta
│ │ │ │ └── Sirenix
│ │ │ │ ├── GlobalSerializationConfig.asset
│ │ │ │ └── GlobalSerializationConfig.asset.meta
│ │ ├── Modules.meta
│ │ └── Modules
│ │ │ ├── Unity.Entities.data
│ │ │ ├── Unity.Entities.data.meta
│ │ │ ├── Unity.Localization.data
│ │ │ ├── Unity.Localization.data.meta
│ │ │ ├── Unity.Mathematics.data
│ │ │ └── Unity.Mathematics.data.meta
│ │ ├── Odin Validator.meta
│ │ ├── Odin Validator
│ │ ├── Editor.meta
│ │ ├── Editor
│ │ │ ├── Config.meta
│ │ │ ├── Config
│ │ │ │ ├── AutomationConfig.asset
│ │ │ │ ├── AutomationConfig.asset.meta
│ │ │ │ ├── GlobalValidationConfig.asset
│ │ │ │ ├── GlobalValidationConfig.asset.meta
│ │ │ │ ├── RuleConfig.asset
│ │ │ │ └── RuleConfig.asset.meta
│ │ │ ├── Profiles.meta
│ │ │ └── Profiles
│ │ │ │ ├── Main Profile.asset
│ │ │ │ └── Main Profile.asset.meta
│ │ ├── EnsureCorrectOdinVersion.cs
│ │ ├── EnsureCorrectOdinVersion.cs.meta
│ │ ├── Readme.txt
│ │ └── Readme.txt.meta
│ │ ├── Readme.txt
│ │ └── Readme.txt.meta
├── Scenes.meta
└── Scenes
│ ├── 1. Start.unity
│ ├── 1. Start.unity.meta
│ ├── 2. ExternalNode.unity
│ └── 2. ExternalNode.unity.meta
├── Images
├── 1.png
├── 2.png
├── 3.png
├── LowerPriorityAbort.gif
└── StickNoteAndGroup.png
├── LICENSE
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── AutoStreamingSettings.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── MemorySettings.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Packages
│ └── com.unity.testtools.codecoverage
│ │ └── Settings.json
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── SceneTemplateSettings.json
├── TagManager.asset
├── TimeManager.asset
├── TimelineSettings.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
├── XRSettings.asset
└── boot.config
├── README.md
└── UIElementsSchema
├── UIElements.xsd
├── Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd
├── Unity.Cloud.Collaborate.Components.xsd
├── Unity.Cloud.Collaborate.Views.xsd
├── Unity.Profiling.Editor.xsd
├── Unity.UI.Builder.xsd
├── UnityEditor.Experimental.GraphView.xsd
├── UnityEditor.Overlays.xsd
├── UnityEditor.PackageManager.UI.Internal.xsd
├── UnityEditor.Search.xsd
├── UnityEditor.ShortcutManagement.xsd
├── UnityEditor.UIElements.Debugger.xsd
├── UnityEditor.UIElements.xsd
└── UnityEngine.UIElements.xsd
/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 | #
3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
4 | #
5 | /[Ll]ibrary/
6 | /[Tt]emp/
7 | /[Oo]bj/
8 | /[Bb]uild/
9 | /[Bb]uilds/
10 | /[Ll]ogs/
11 | /[Uu]ser[Ss]ettings/
12 |
13 | # MemoryCaptures can get excessive in size.
14 | # They also could contain extremely sensitive data
15 | /[Mm]emoryCaptures/
16 |
17 | # Recordings can get excessive in size
18 | /[Rr]ecordings/
19 |
20 | # Uncomment this line if you wish to ignore the asset store tools plugin
21 | # /[Aa]ssets/AssetStoreTools*
22 |
23 | # Autogenerated Jetbrains Rider plugin
24 | /[Aa]ssets/Plugins/Editor/JetBrains*
25 |
26 | # Visual Studio cache directory
27 | .vs/
28 |
29 | # Gradle cache directory
30 | .gradle/
31 |
32 | # Autogenerated VS/MD/Consulo solution and project files
33 | ExportedObj/
34 | .consulo/
35 | *.csproj
36 | *.unityproj
37 | *.sln
38 | *.suo
39 | *.tmp
40 | *.user
41 | *.userprefs
42 | *.pidb
43 | *.booproj
44 | *.svd
45 | *.pdb
46 | *.mdb
47 | *.opendb
48 | *.VC.db
49 |
50 | # Unity3D generated meta files
51 | *.pidb.meta
52 | *.pdb.meta
53 | *.mdb.meta
54 |
55 | # Unity3D generated file on crash reports
56 | sysinfo.txt
57 |
58 | # Builds
59 | *.apk
60 | *.aab
61 | *.unitypackage
62 | *.app
63 |
64 | # Crashlytics generated file
65 | crashlytics-build.properties
66 |
67 | # Packed Addressables
68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
69 |
70 | # Temporary auto-generated Android Assets
71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta
72 | /[Aa]ssets/[Ss]treamingAssets/aa/*
--------------------------------------------------------------------------------
/.idea/.idea.BehaviorTreeEditor/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Rider ignored files
5 | /modules.xml
6 | /contentModel.xml
7 | /.idea.BehaviorTreeEditor.iml
8 | /projectSettingsUpdater.xml
9 | # Editor-based HTTP Client requests
10 | /httpRequests/
11 | # Datasource local storage ignored files
12 | /dataSources/
13 | /dataSources.local.xml
14 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviorTreeEditor/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviorTreeEditor/.idea/indexLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviorTreeEditor/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviourTreeEditor/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Rider ignored files
5 | /.idea.BehaviourTreeEditor.iml
6 | /modules.xml
7 | /projectSettingsUpdater.xml
8 | /contentModel.xml
9 | # Editor-based HTTP Client requests
10 | /httpRequests/
11 | # Datasource local storage ignored files
12 | /dataSources/
13 | /dataSources.local.xml
14 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviourTreeEditor/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviourTreeEditor/.idea/indexLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/.idea.BehaviourTreeEditor/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Assets/BTCore.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d4f1dd9bca25ac4693f7d4f2fe5f562
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e1758633035e05e4e9c3aed4746fd117
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data/TestBothAbort.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71f30aa9d941a724c8c871f8e96b6dbe
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data/TestExternalNode.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 179217fab82e14f458be98215972af99
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data/TestGroupStickNoteComment.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fbd9873839ee74f478f2c41b4857a70b
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data/TestLowerPriorityAbort.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 00f57fc231ebdb148a581b7632f9622a
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data/TestRandom.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 03fd2db1d4bde27408568c1a638ff948
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Data/TestSelfAbort.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9bb5a608e2d29f41a34eb5f96df8e60
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d27051b377de6f4098a8be06e2bf625
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTEditor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BTEditor",
3 | "rootNamespace": "",
4 | "references": [
5 | "GUID:16a6c8a30b87ea844a4b0c5eb1fa6caa",
6 | "GUID:2288bc6750e10134db421a698fc0b82c"
7 | ],
8 | "includePlatforms": [
9 | "Editor"
10 | ],
11 | "excludePlatforms": [],
12 | "allowUnsafeCode": false,
13 | "overrideReferences": false,
14 | "precompiledReferences": [],
15 | "autoReferenced": true,
16 | "defineConstraints": [],
17 | "versionDefines": [],
18 | "noEngineReferences": false
19 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTEditor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c18754c71f35e14abdcff74889c3a0c
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTEditorDef.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTEditorDef.cs
3 | // Brief: BTEditorDef
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | using System.Reflection;
11 | using Newtonsoft.Json;
12 |
13 | namespace BTCore.Editor
14 | {
15 | public static class BTEditorDef
16 | {
17 | // BT窗口结构文件路径
18 | public static readonly string BTEditorWindowUxmlPath = "Assets/BTCore/Editor/UIBuilder/BTEditorWindow.uxml";
19 | // BT节点结构文件路径
20 | public static readonly string BTNodeViewUxmlPath = "Assets/BTCore/Editor/UIBuilder/BTNodeView.uxml";
21 | // 树形窗口视图样式路径
22 | public static readonly string BTViewStylePath = "Assets/BTCore/Editor/UIBuilder/BTViewStyle.uss";
23 |
24 | // 存放序列化后的BT数据目录
25 | public static readonly string DataDir = "Assets/BTCore/Data";
26 | // 默认保存BT文件名称
27 | public static readonly string DefaultFileName = "NewBT.json";
28 | // 对应BT数据序列化保存文件后缀
29 | public static readonly string DataExt = "json";
30 |
31 | public static BindingFlags BindValueFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTEditorDef.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 45cf50df32c7466e8dda41c9b9511beb
3 | timeCreated: 1695976518
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTEditorWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59dededf5d711244e8815eab56a80681
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTNodeView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1dea7fb7187a4af5a74e9c7f4df0913a
3 | timeCreated: 1696492912
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTUndoRedo.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 223f67daee8c4d31b0064987a57788ed
3 | timeCreated: 1697348219
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BTView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a6b2a182d99342029e01f737889f9ceb
3 | timeCreated: 1696238174
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/BlackboardView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f805d6f45974628bfd5ae43314900fe
3 | timeCreated: 1696774943
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/ColorGroup.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ColorGroup.cs
3 | // Brief: ColorGroup
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-27
8 | //============================================================
9 |
10 | using UnityEditor.UIElements;
11 | using UnityEngine;
12 | using UnityEngine.UIElements;
13 | using Group = UnityEditor.Experimental.GraphView.Group;
14 |
15 | namespace BTCore.Editor
16 | {
17 | public class ColorGroup : Group
18 | {
19 | public ColorGroup() {
20 | var colorField = new ColorField() { value = new Color(0.7f, 0.8f, 0.7f) };
21 | colorField.RegisterValueChangedCallback(evt => ApplyColor(evt.newValue));
22 | colorField.style.width = 50;
23 | colorField.style.height = 20;
24 | headerContainer.Add(colorField);
25 | ApplyColor(colorField.value);
26 | }
27 |
28 | private void ApplyColor(Color color) {
29 | style.backgroundColor = new StyleColor(new Color(color.r, color.g, color.b, 0.3f));
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/ColorGroup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 45251abe6d1e460eb6fcdbad618c7f6f
3 | timeCreated: 1719469670
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/DoubleClickNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 526b610df79c459d8d7451745f872dba
3 | timeCreated: 1719629062
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/IDataSerializable.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: IDataSerializable.cs
3 | // Brief: IDataSerializable
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-03-24
8 | //============================================================
9 |
10 | namespace BTCore.Editor
11 | {
12 | public interface IDataSerializable
13 | {
14 | void ImportData(T data);
15 |
16 | T ExportData();
17 | }
18 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/IDataSerializable.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b97924b3b5eec0e4f83fcc38f064ed30
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 284a0c717cb64100a58b2810890dc0a7
3 | timeCreated: 1696738782
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Actions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e22db08c78a54cc295a185d105f07ea7
3 | timeCreated: 1696759561
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Actions/LogInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: LogInspector.cs
3 | // Brief: LogInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-08
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Actions;
12 | using BTCore.Runtime.Attributes;
13 | using Sirenix.OdinInspector;
14 |
15 | namespace BTCore.Editor.Inspectors.Actions
16 | {
17 | [NodeInspector(typeof(Log))]
18 | public class LogInspector : BTNodeInspector
19 | {
20 | [ShowInInspector]
21 | [LabelText("Log")]
22 | [LabelWidth(100)]
23 | [OnValueChanged("OnFieldValueChanged")]
24 | private SharedValueInspector _message = new SharedValueInspector();
25 |
26 | private Log _logData;
27 |
28 | protected override void OnImportData(Log data) {
29 | _logData = data;
30 | _message.ImportData(data.Message);
31 | }
32 |
33 | public override BTNode ExportData() {
34 | return _logData;
35 | }
36 |
37 | protected override void OnFieldValueChanged() {
38 | _logData.Message = _message.ExportData();
39 | base.OnFieldValueChanged();
40 | }
41 |
42 | public override void Reset() {
43 | _message = new SharedValueInspector();
44 | _logData = null;
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Actions/LogInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2fbdde5fd04545128c97684e4f1fb963
3 | timeCreated: 1696738954
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Actions/WaitInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: WaitInspector.cs
3 | // Brief: WaitInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-08
8 | //============================================================
9 |
10 |
11 | using BTCore.Runtime;
12 | using BTCore.Runtime.Actions;
13 | using BTCore.Runtime.Attributes;
14 | using Sirenix.OdinInspector;
15 |
16 | namespace BTCore.Editor.Inspectors.Actions
17 | {
18 | [NodeInspector(typeof(Wait))]
19 | public class WaitInspector : BTNodeInspector
20 | {
21 | [ShowInInspector]
22 | [LabelText("Duration(ms)")]
23 | [LabelWidth(100)]
24 | [OnValueChanged("OnFieldValueChanged")]
25 | private int _duration;
26 |
27 | private Wait _waitData;
28 |
29 | protected override void OnImportData(Wait data) {
30 | _waitData = data;
31 | _duration = data.Duration;
32 | }
33 |
34 | public override BTNode ExportData() {
35 | return _waitData;
36 | }
37 |
38 | protected override void OnFieldValueChanged() {
39 | _waitData.Duration = _duration;
40 | base.OnFieldValueChanged();
41 | }
42 |
43 | public override void Reset() {
44 | _duration = 0;
45 | _waitData = null;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Actions/WaitInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71cfc68edfed4246bbd243d4ffb90999
3 | timeCreated: 1696739966
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/BTNodeInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTNodeInspector.cs
3 | // Brief: BTNodeInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-08
8 | //============================================================
9 |
10 | using System;
11 | using BTCore.Runtime;
12 | using Sirenix.OdinInspector;
13 | using UnityEngine;
14 |
15 | namespace BTCore.Editor.Inspectors
16 | {
17 | public abstract class BTNodeInspector : InspectorBase, IDataSerializable
18 | {
19 | [HideInInspector]
20 | public Action OnNodeViewUpdate;
21 |
22 | [TextArea]
23 | [OnValueChanged("OnFieldValueChanged")]
24 | public string Comment;
25 |
26 | public abstract void ImportData(BTNode data);
27 | public abstract BTNode ExportData();
28 |
29 | public void OnBlackboardValueChanged() {
30 | foreach (var fieldInfo in GetType().GetFields(BTEditorDef.BindValueFlags)) {
31 | if (fieldInfo.FieldType.IsSubclassOf(typeof(SharedValueInspector))) {
32 | var svInspector = fieldInfo.GetValue(this) as SharedValueInspector;
33 | svInspector?.RebindValueName();
34 | }
35 | }
36 | }
37 | }
38 |
39 | public abstract class BTNodeInspector : BTNodeInspector where T : BTNode
40 | {
41 | private BTNode _btNode;
42 |
43 | public override void ImportData(BTNode data) {
44 | _btNode = data;
45 | Comment = data.Comment;
46 | OnImportData(data as T);
47 | }
48 |
49 | protected abstract void OnImportData(T data);
50 |
51 | // 字段数值变化后,可能需要刷新下对应NodeView的显示,这个应放到最后调用
52 | protected override void OnFieldValueChanged() {
53 | _btNode.Comment = Comment;
54 | OnNodeViewUpdate?.Invoke();
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/BTNodeInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 70ca7aaef464441bbb387fdbe5b9538e
3 | timeCreated: 1696738833
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/BlackboardInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 495034841575400caa858adc7659703a
3 | timeCreated: 1696842825
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/BlackboardValueInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a6c66794a3105b84abf73fca27f2dfd1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 42524897b7c143729d5531bf7ef1c488
3 | timeCreated: 1718788622
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/CompositeInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: CompositeInspector.cs
3 | // Brief: CompositeInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-19
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using Sirenix.OdinInspector;
12 |
13 | namespace BTCore.Editor.Inspectors.Composites
14 | {
15 | public abstract class CompositeInspector : BTNodeInspector where T : BTNode
16 | {
17 | [ShowInInspector]
18 | [LabelText("中断类型")]
19 | [LabelWidth(100)]
20 | [OnValueChanged("OnFieldValueChanged")]
21 | protected AbortType AbortType = AbortType.None;
22 | }
23 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/CompositeInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 33f8ef54f78e4dcab87a584d013bcaf5
3 | timeCreated: 1718789064
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/RandomSelectorInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: RandomSelectorInspector.cs
3 | // Brief: RandomSelectorInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-07-05
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Composites;
13 | using Sirenix.OdinInspector;
14 |
15 | namespace BTCore.Editor.Inspectors.Composites
16 | {
17 | [NodeInspector(typeof(RandomSelector))]
18 | public class RandomSelectorInspector : CompositeInspector
19 | {
20 | [ShowInInspector]
21 | [HorizontalGroup]
22 | [LabelText("Use Seed:")]
23 | [LabelWidth(100)]
24 | [OnValueChanged("OnFieldValueChanged")]
25 | private bool _useSeed;
26 |
27 | [ShowInInspector]
28 | [HorizontalGroup]
29 | [LabelText("Seed:")]
30 | [LabelWidth(40)]
31 | [ShowIf("_useSeed")]
32 | [OnValueChanged("OnFieldValueChanged")]
33 | private int _seed;
34 |
35 | private RandomSelector _selector;
36 |
37 |
38 | public override BTNode ExportData() {
39 | return _selector;
40 | }
41 |
42 | protected override void OnFieldValueChanged() {
43 | _selector.Seed = _seed;
44 | _selector.UseSeed = _useSeed;
45 | base.OnFieldValueChanged();
46 | }
47 |
48 | protected override void OnImportData(RandomSelector data) {
49 | _selector = data;
50 | _seed = data.Seed;
51 | _useSeed = data.UseSeed;
52 | }
53 |
54 | public override void Reset() {
55 | _selector = null;
56 | AbortType = AbortType.None;
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/RandomSelectorInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98691c123a244076983bdb742effa26d
3 | timeCreated: 1720112957
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/RandomSequenceInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: RandomSequenceInspector.cs
3 | // Brief: RandomSequenceInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-07-04
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Composites;
13 | using Sirenix.OdinInspector;
14 |
15 | namespace BTCore.Editor.Inspectors.Composites
16 | {
17 | [NodeInspector(typeof(RandomSequence))]
18 | public class RandomSequenceInspector : CompositeInspector
19 | {
20 | [ShowInInspector]
21 | [HorizontalGroup]
22 | [LabelText("Use Seed:")]
23 | [LabelWidth(100)]
24 | [OnValueChanged("OnFieldValueChanged")]
25 | private bool _useSeed;
26 |
27 | [ShowInInspector]
28 | [HorizontalGroup]
29 | [LabelText("Seed:")]
30 | [LabelWidth(40)]
31 | [ShowIf("_useSeed")]
32 | [OnValueChanged("OnFieldValueChanged")]
33 | private int _seed;
34 |
35 | private RandomSequence _sequence;
36 |
37 |
38 | public override BTNode ExportData() {
39 | return _sequence;
40 | }
41 |
42 | protected override void OnFieldValueChanged() {
43 | _sequence.Seed = _seed;
44 | _sequence.UseSeed = _useSeed;
45 | base.OnFieldValueChanged();
46 | }
47 |
48 | protected override void OnImportData(RandomSequence data) {
49 | _sequence = data;
50 | _seed = data.Seed;
51 | _useSeed = data.UseSeed;
52 | }
53 |
54 | public override void Reset() {
55 | _sequence = null;
56 | AbortType = AbortType.None;
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/RandomSequenceInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e86cc98b5a74b019b2d24fe0584f68c
3 | timeCreated: 1720022755
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/SelectorInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: SelectorInspector.cs
3 | // Brief: SelectorInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-24
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Composites;
13 |
14 | namespace BTCore.Editor.Inspectors.Composites
15 | {
16 | [NodeInspector(typeof(Selector))]
17 | public class SelectorInspector : CompositeInspector
18 | {
19 | private Selector _selector;
20 |
21 | protected override void OnFieldValueChanged() {
22 | _selector.AbortType = AbortType;
23 | base.OnFieldValueChanged();
24 | }
25 |
26 | public override void Reset() {
27 | _selector = null;
28 | AbortType = AbortType.None;
29 | }
30 |
31 | public override BTNode ExportData() {
32 | return _selector;
33 | }
34 |
35 | protected override void OnImportData(Selector data) {
36 | _selector = data;
37 | AbortType = _selector.AbortType;
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/SelectorInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f9a29ca488740808c7bdfd9f4b0cdef
3 | timeCreated: 1719218986
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/SequenceInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: SequenceInspector.cs
3 | // Brief: SequenceInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-19
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Composites;
13 |
14 | namespace BTCore.Editor.Inspectors.Composites
15 | {
16 | [NodeInspector(typeof(Sequence))]
17 | public class SequenceInspector : CompositeInspector
18 | {
19 | private Sequence _sequence;
20 |
21 | protected override void OnImportData(Sequence data) {
22 | _sequence = data;
23 | AbortType = data.AbortType;
24 | }
25 |
26 | public override BTNode ExportData() {
27 | return _sequence;
28 | }
29 |
30 | protected override void OnFieldValueChanged() {
31 | _sequence.AbortType = AbortType;
32 | base.OnFieldValueChanged();
33 | }
34 |
35 | public override void Reset() {
36 | _sequence = null;
37 | AbortType = AbortType.None;
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Composites/SequenceInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b350b8146fec48809643edcab46db4b6
3 | timeCreated: 1718789223
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Conditions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b85d539f44404c76aa9b451304a19a23
3 | timeCreated: 1697438917
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Conditions/IsKeyDownInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: IsKeyDownInspector.cs
3 | // Brief: IsKeyDownInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-25
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Unity.Conditions;
13 | using Sirenix.OdinInspector;
14 | using UnityEngine;
15 |
16 | namespace BTCore.Editor.Inspectors.Conditions
17 | {
18 | [NodeInspector(typeof(IsKeyDown))]
19 | public class IsKeyDownInspector : BTNodeInspector
20 | {
21 | [ShowInInspector]
22 | [LabelText("按键:")]
23 | [LabelWidth(100)]
24 | [OnValueChanged("OnFieldValueChanged")]
25 | private KeyCode _keyCode;
26 |
27 | private IsKeyDown _isKeyDown;
28 |
29 | protected override void OnFieldValueChanged() {
30 | _isKeyDown.KeyCode = _keyCode;
31 | base.OnFieldValueChanged();
32 | }
33 |
34 | public override void Reset() {
35 | _isKeyDown = null;
36 | _keyCode = KeyCode.None;
37 | }
38 |
39 | public override BTNode ExportData() {
40 | return _isKeyDown;
41 | }
42 |
43 | protected override void OnImportData(IsKeyDown data) {
44 | _isKeyDown = data;
45 | _keyCode = data.KeyCode;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Conditions/IsKeyDownInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0c60736e418d439980a09fa9777c6ead
3 | timeCreated: 1719310991
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Conditions/ProbabilityInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ProbabilityInspector.cs
3 | // Brief: ProbabilityInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-16
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Conditions;
13 | using Sirenix.OdinInspector;
14 |
15 | namespace BTCore.Editor.Inspectors.Conditions
16 | {
17 | [NodeInspector(typeof(RandomProbability))]
18 | public class RandomProbabilityInspector : BTNodeInspector
19 | {
20 | [ShowInInspector]
21 | [LabelText("Probability(?)")]
22 | [LabelWidth(100)]
23 | [OnValueChanged("OnFieldValueChanged")]
24 | [PropertyTooltip("概率范围0 ~ 100")]
25 | private SharedValueInspector _probability = new SharedValueInspector();
26 |
27 | private RandomProbability _probabilityData;
28 |
29 | protected override void OnImportData(RandomProbability data) {
30 | _probabilityData = data;
31 | _probability.ImportData(data.Probability);
32 | }
33 |
34 | public override BTNode ExportData() {
35 | return _probabilityData;
36 | }
37 |
38 | protected override void OnFieldValueChanged() {
39 | _probabilityData.Probability = _probability.ExportData();
40 | base.OnFieldValueChanged();
41 | }
42 |
43 | public override void Reset() {
44 | _probability = new SharedValueInspector();
45 | _probabilityData = null;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Conditions/ProbabilityInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ef08f029a51049798d8d1d615a857b8c
3 | timeCreated: 1697438944
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Decorators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c39afd9a0b5445beb985ada6762eaddb
3 | timeCreated: 1697441076
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Decorators/RepeaterInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: RepeaterInspector.cs
3 | // Brief: RepeaterInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-16
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Composites;
13 | using BTCore.Runtime.Decorators;
14 | using Sirenix.OdinInspector;
15 |
16 | namespace BTCore.Editor.Inspectors.Decorators
17 | {
18 | [NodeInspector(typeof(Repeater))]
19 | public class RepeaterInspector : BTNodeInspector
20 | {
21 | [ShowInInspector]
22 | [LabelText("Repeat Count(?)")]
23 | [LabelWidth(100)]
24 | [OnValueChanged("OnFieldValueChanged")]
25 | [PropertyTooltip("循环次数,设定为负数一直循环执行")]
26 | private int _count;
27 |
28 | private Repeater _repeater;
29 |
30 | protected override void OnImportData(Repeater data) {
31 | _repeater = data;
32 | _count = data.RepeatCount;
33 | }
34 |
35 | public override BTNode ExportData() {
36 | return _repeater;
37 | }
38 |
39 | protected override void OnFieldValueChanged() {
40 | _repeater.RepeatCount = _count;
41 | base.OnFieldValueChanged();
42 | }
43 |
44 | public override void Reset() {
45 | _count = 0;
46 | _repeater = null;
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Decorators/RepeaterInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: abe930883b954ade9b9b5a8d42259eda
3 | timeCreated: 1697441152
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 77690f7405c343ad8be1a537d34fcc35
3 | timeCreated: 1718794839
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals/ExternalActionInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ExternalActionInspector.cs
3 | // Brief: ExternalActionInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Externals;
13 |
14 | namespace BTCore.Editor.Inspectors.Externals
15 | {
16 | [NodeInspector(typeof(ExternalAction))]
17 | public class ExternalActionInspector : ExternalNodeInspector
18 | {
19 | protected override string GetInfoMessage() {
20 | return "必须填写外部Action类型名称!";
21 | }
22 |
23 | protected override string GetTitleName() {
24 | return "External Action";
25 | }
26 |
27 | public override BTNode ExportData() {
28 | return ExternalNode as BTNode;
29 | }
30 |
31 | protected override void OnImportData(ExternalAction data) {
32 | ExternalNode = data;
33 | TypeName = data.TypeName;
34 | Properties = data.Properties;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals/ExternalActionInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b3dc3bb7c2dd43c1baeee48f494ed071
3 | timeCreated: 1697617186
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals/ExternalConditionInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ExternalCondition.cs
3 | // Brief: ExternalCondition
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Attributes;
12 | using BTCore.Runtime.Externals;
13 |
14 | namespace BTCore.Editor.Inspectors.Externals
15 | {
16 | [NodeInspector(typeof(ExternalCondition))]
17 | public class ExternalConditionInspector : ExternalNodeInspector
18 | {
19 | protected override string GetInfoMessage() {
20 | return "必须填写外部Condition类型名称!";
21 | }
22 |
23 | protected override string GetTitleName() {
24 | return "External Condition";
25 | }
26 |
27 | public override BTNode ExportData() {
28 | return ExternalNode as BTNode;
29 | }
30 |
31 | protected override void OnImportData(ExternalCondition data) {
32 | ExternalNode = data;
33 | TypeName = data.TypeName;
34 | Properties = data.Properties;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals/ExternalConditionInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f2177ac8c6024910a3346459f534eeee
3 | timeCreated: 1697624406
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals/ExternalNodeInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ExternalNodeInspector.cs
3 | // Brief: ExternalNodeInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 | using BTCore.Runtime;
12 | using BTCore.Runtime.Externals;
13 | using Sirenix.OdinInspector;
14 |
15 | namespace BTCore.Editor.Inspectors.Externals
16 | {
17 | public abstract class ExternalNodeInspector : BTNodeInspector where T : BTNode
18 | {
19 | [TitleGroup("$GetTitleName")]
20 | [ShowInInspector]
21 | [LabelText("TypeName")]
22 | [LabelWidth(100)]
23 | [OnValueChanged("OnFieldValueChanged")]
24 | [ValidateInput("StringValidator", "$GetInfoMessage", ContinuousValidationCheck = true)]
25 | protected string TypeName;
26 |
27 | [TitleGroup("$GetTitleName")]
28 | [ShowInInspector]
29 | [OnValueChanged("OnFieldValueChanged")]
30 | protected Dictionary Properties = new Dictionary();
31 |
32 | protected IExternalNode ExternalNode;
33 |
34 | private bool StringValidator(string value)
35 | {
36 | return !string.IsNullOrEmpty(value);
37 | }
38 |
39 | protected abstract string GetInfoMessage();
40 |
41 | protected abstract string GetTitleName();
42 |
43 | protected override void OnFieldValueChanged() {
44 | if (ExternalNode == null) {
45 | return;
46 | }
47 |
48 | ExternalNode.TypeName = TypeName;
49 | ExternalNode.Properties = Properties;
50 | // 更新Name字段,同步更新对应NodeView的title显示
51 | if (ExternalNode is BTNode node) {
52 | node.Name = TypeName;
53 | node.Comment = Comment;
54 | base.OnFieldValueChanged();
55 | }
56 | }
57 |
58 | public override void Reset() {
59 | TypeName = null;
60 | Properties = new Dictionary();
61 | ExternalNode = null;
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/Externals/ExternalNodeInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4b03f7092ab4863b5243ed996c9b24e
3 | timeCreated: 1697621808
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/InspectorBase.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: InspectorBase.cs
3 | // Brief: InspectorBase
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-09
8 | //============================================================
9 |
10 | using Sirenix.OdinInspector;
11 |
12 | namespace BTCore.Editor.Inspectors
13 | {
14 | public abstract class InspectorBase : SerializedScriptableObject
15 | {
16 | protected abstract void OnFieldValueChanged();
17 |
18 | public abstract void Reset();
19 | }
20 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/InspectorBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c5e95ccc64924fdeaeb4941328139661
3 | timeCreated: 1696842702
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/MonoBehaviours.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7fd195380b394b0996056155ce0273eb
3 | timeCreated: 1719636736
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/MonoBehaviours/BehaviorTreeInspector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BehaviorTreeInspector.cs
3 | // Brief: BehaviorTreeInspector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-29
8 | //============================================================
9 |
10 | using BTCore.Runtime.Unity;
11 | using UnityEditor;
12 | using UnityEngine;
13 |
14 | namespace BTCore.Editor.Inspectors.MonoBehaviours
15 | {
16 | [CustomEditor(typeof(BehaviorTree))]
17 | public class BehaviorTreeInspector : UnityEditor.Editor
18 | {
19 | private SerializedProperty _btAsset;
20 | private BehaviorTree _behaviorTree;
21 |
22 | private void OnEnable() {
23 | _btAsset = serializedObject.FindProperty("_btAsset");
24 | _behaviorTree = (BehaviorTree) target;
25 | }
26 |
27 | public override void OnInspectorGUI() {
28 | serializedObject.Update();
29 |
30 | EditorGUILayout.BeginHorizontal();
31 | EditorGUI.BeginChangeCheck();
32 |
33 | EditorGUILayout.PropertyField(_btAsset, new GUIContent("BTAsset"));
34 | // 立即更新变化值
35 | serializedObject.ApplyModifiedProperties();
36 | // BTAsset有变化时,若BT窗口已经打开需更新显示
37 | if (EditorGUI.EndChangeCheck()) {
38 | if (BTEditorWindow.Instance == null) {
39 | return;
40 | }
41 | _behaviorTree.CreateBTree();
42 | BTEditorWindow.Instance.SelectNewTree(_behaviorTree.BTree);
43 | }
44 |
45 | if (GUILayout.Button("Open", GUILayout.Width(50))) {
46 | if (BTEditorWindow.Instance == null) {
47 | BTEditorWindow.OpenWindow();
48 | }
49 |
50 | if (_behaviorTree.BTree == null) {
51 | _behaviorTree.CreateBTree();
52 | }
53 |
54 | BTEditorWindow.Instance.SelectNewTree(_behaviorTree.BTree);
55 | }
56 |
57 | EditorGUILayout.EndHorizontal();
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/MonoBehaviours/BehaviorTreeInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a1942e2095a4b37bf3215ea451c4f65
3 | timeCreated: 1719630756
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Inspectors/SharedValueInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90bc8fc7331c4cdcb773d48841152a6c
3 | timeCreated: 1696956774
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/NodeInspectorView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bce880b7f3264cb3a415908461512e30
3 | timeCreated: 1696239098
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/NodePort.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a7a90eff32ad4dc09bdf305bbdf0ca6c
3 | timeCreated: 1696494457
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/NodeSearchWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7398e03233ba43faa0b98c41534c2da5
3 | timeCreated: 1696492504
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 709275f0a4244f941a208b665feb39d2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Resources/ConditionalAbortBothIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/BTCore/Editor/Resources/ConditionalAbortBothIcon.png
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Resources/ConditionalAbortLowerPriorityIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/BTCore/Editor/Resources/ConditionalAbortLowerPriorityIcon.png
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/Resources/ConditionalAbortSelfIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/BTCore/Editor/Resources/ConditionalAbortSelfIcon.png
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/SplitView.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: SplitView.cs
3 | // Brief: SplitView
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-02
8 | //============================================================
9 |
10 | using UnityEngine.UIElements;
11 |
12 | namespace BTCore.Editor
13 | {
14 | public class SplitView : TwoPaneSplitView
15 | {
16 | public new class UxmlFactory : UxmlFactory { }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/SplitView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2817d423773c42b4aa112490c2d91756
3 | timeCreated: 1696238507
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 09cba6d41c5f40b19f930ab985819deb
3 | timeCreated: 1696236751
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTEditorWindow.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTEditorWindow.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82b523921c0a7bf4587ffc7c74803fad
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTEditorWindowStyle.uss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/BTCore/Editor/UIBuilder/BTEditorWindowStyle.uss
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTEditorWindowStyle.uss.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 801f0b4a7e51e754f954cea568bcf081
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
11 | disableValidation: 0
12 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTNodeView.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTNodeView.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae1024d39a8796045b23a6862700b619
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTNodeViewStyle.uss.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a50e79405fc40e4cb77a5df374ea065
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
11 | disableValidation: 0
12 |
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTViewStyle.uss:
--------------------------------------------------------------------------------
1 | GridBackground {
2 | --grid-background-color: rgb(40, 40, 40);
3 | --line-color: rgba(193, 196, 192, 0.1);
4 | --thick-line-color: rgba(193, 196, 192, 0.1);
5 | --spacing: 15;
6 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Editor/UIBuilder/BTViewStyle.uss.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7db1457a349c53246aa2e610d5b0274e
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
11 | disableValidation: 0
12 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 12f9bbd64156da341984e72b7fbf3440
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/BTRuntime.Unity.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BTRuntime.Unity",
3 | "rootNamespace": "",
4 | "references": [
5 | "GUID:16a6c8a30b87ea844a4b0c5eb1fa6caa"
6 | ],
7 | "includePlatforms": [],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": [],
14 | "versionDefines": [],
15 | "noEngineReferences": false
16 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/BTRuntime.Unity.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2288bc6750e10134db421a698fc0b82c
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/BehaviorTree.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BehaviorTree.cs
3 | // Brief: BehaviorTree
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | using System;
11 | using Newtonsoft.Json;
12 | using UnityEngine;
13 |
14 | namespace BTCore.Runtime.Unity
15 | {
16 | public class BehaviorTree : MonoBehaviour
17 | {
18 | [SerializeField]
19 | private TextAsset _btAsset;
20 |
21 | public BTree BTree { get; private set; }
22 |
23 | private void Start() {
24 | BTLogger.OnLogReceived += OnLogReceived;
25 | CreateBTree();
26 | BTree?.Enable();
27 | }
28 |
29 | public void CreateBTree() {
30 | if (_btAsset == null) {
31 | Debug.LogError("Please assign bt asset file.");
32 | return;
33 | }
34 |
35 | try {
36 | BTree = JsonConvert.DeserializeObject(_btAsset.text, BTDef.SerializerSettingsAuto);
37 | BTree?.RebuildTree();
38 | }
39 | catch (Exception e) {
40 | Debug.LogError($"BT data deserialize failed, please check bt asset file!\n{e}");
41 | }
42 | }
43 |
44 | private void Update() {
45 | BTree?.Update();
46 | }
47 |
48 | private void OnLogReceived(string message, BTLogType logType) {
49 | switch (logType) {
50 | case BTLogType.Debug:
51 | Debug.Log(message);
52 | break;
53 | case BTLogType.Warning:
54 | Debug.LogWarning(message);
55 | break;
56 | case BTLogType.Error:
57 | Debug.LogError(message);
58 | break;
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/BehaviorTree.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8622cad5583d4017bb3b6e17d55fcaa4
3 | timeCreated: 1696159198
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/Conditions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4e901f91f4e4192904ac15668795b97
3 | timeCreated: 1719310796
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/Conditions/IsKeyDown.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: IsKeyDown.cs
3 | // Brief: IsKeyDown
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-25
8 | //============================================================
9 |
10 | using BTCore.Runtime.Conditions;
11 | using UnityEngine;
12 |
13 | namespace BTCore.Runtime.Unity.Conditions
14 | {
15 | public class IsKeyDown : Condition
16 | {
17 | public KeyCode KeyCode = KeyCode.None;
18 |
19 | protected override bool Validate() {
20 | return Input.GetKeyDown(KeyCode);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.Unity/Conditions/IsKeyDown.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 83cbd94ed1e74bfcbb6441af4dcd874c
3 | timeCreated: 1719310847
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01c300fe0ff14b1449d40335014e8b0b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbe1caf496014bc7a5eb95ebfd9e48e1
3 | timeCreated: 1695987468
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions/Action.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Action.cs
3 | // Brief: 行为节点基类
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Actions
11 | {
12 | public abstract class Action : BTNode
13 | {
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions/Action.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e75acae9b8894fed9fe04f110d5e2499
3 | timeCreated: 1695987658
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions/Log.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Log.cs
3 | // Brief: 日志节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Actions
11 | {
12 | public class Log : Action
13 | {
14 | public SharedValue Message { get; set; } = new();
15 |
16 | protected override void OnStart() {
17 | base.OnStart();
18 | }
19 |
20 | protected override NodeState OnUpdate() {
21 | var mes = $"Log: {Message.Value}";
22 |
23 | BTLogger.Debug(mes);
24 | return NodeState.Success;
25 | }
26 |
27 | protected override void OnStop() {
28 |
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions/Log.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7dc7c76f192e4812951e8b1c43181360
3 | timeCreated: 1695987759
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions/Wait.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Wait.cs
3 | // Brief: 等待节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime.Actions
13 | {
14 | public class Wait : Action
15 | {
16 | public int Duration { get; set; } = 1000; // 等待时长(单位ms)
17 |
18 | private DateTime _startTime;
19 |
20 | protected override void OnStart() {
21 | base.OnStart();
22 | _startTime = DateTime.UtcNow;
23 | }
24 |
25 | protected override NodeState OnUpdate() {
26 | var elapsedTime = (DateTime.UtcNow - _startTime).TotalMilliseconds;
27 | return elapsedTime > Duration ? NodeState.Success : NodeState.Running;
28 | }
29 |
30 | protected override void OnStop() {
31 |
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Actions/Wait.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6bf8d0fdb37a42908c45cc362f00462c
3 | timeCreated: 1696001787
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Attributes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c239e99e24ae4effad20b9ae5f782ae6
3 | timeCreated: 1696735873
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Attributes/NodeInspectorAttribute.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTNodeAttribute.cs
3 | // Brief: BTNodeAttribute
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-08
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime.Attributes
13 | {
14 | [AttributeUsage(AttributeTargets.Class)]
15 | public class NodeInspectorAttribute : Attribute
16 | {
17 | public Type NodeType { get; }
18 |
19 | public NodeInspectorAttribute(Type nodeType) {
20 | NodeType = nodeType;
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Attributes/NodeInspectorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f450f19b9aaa46b7b9703964458c63ca
3 | timeCreated: 1696756474
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTData.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: NodeData.cs
3 | // Brief: NodeData
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-17
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 | using System.Runtime.Serialization;
12 | using BTCore.Runtime.OtherNodes;
13 |
14 | namespace BTCore.Runtime
15 | {
16 | public class BTData
17 | {
18 | public EntryNode EntryNode;
19 | public readonly List Nodes = new();
20 |
21 | private readonly Dictionary _guid2Nodes = new();
22 |
23 | #if UNITY_EDITOR
24 | public readonly List StickNotes = new();
25 | public readonly List NodeGroups = new();
26 |
27 | public void AddNode(BTNode node) {
28 | Nodes.Add(node);
29 | _guid2Nodes.Add(node.Guid, node);
30 | }
31 |
32 | public void RemoveNode(BTNode node) {
33 | if (!_guid2Nodes.ContainsKey(node.Guid)) {
34 | return;
35 | }
36 |
37 | var toRemove = _guid2Nodes[node.Guid];
38 | Nodes.Remove(toRemove);
39 | _guid2Nodes.Remove(node.Guid);
40 | }
41 | #endif
42 |
43 | ///
44 | /// 节点替换,主要用于外部节点处理
45 | ///
46 | /// 位于Nodes列表中的索引
47 | /// 新的外部节点
48 | public void ReplaceNode(int index, BTNode newNode) {
49 | if (index < 0 || index >= Nodes.Count) {
50 | return;
51 | }
52 |
53 | Nodes[index] = newNode;
54 | _guid2Nodes[newNode.Guid] = newNode;
55 | }
56 |
57 | public BTNode GetNodeByGuid(string guid) {
58 | return _guid2Nodes.ContainsKey(guid) ? _guid2Nodes[guid] : null;
59 | }
60 |
61 | // TODO 其他序列化可能不会触发回调
62 | [OnDeserialized]
63 | private void OnAfterDeserialize(StreamingContext context) {
64 | Nodes.ForEach(node => {
65 | if (node is EntryNode entryNode) {
66 | EntryNode = entryNode;
67 | }
68 | _guid2Nodes.Add(node.Guid, node);
69 | });
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a738f0eaa38abb14fa432a8789e2d2ac
3 | timeCreated: 1697534362
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTDef.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTDef.cs
3 | // Brief: BTDef
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | using Newtonsoft.Json;
11 |
12 | namespace BTCore.Runtime
13 | {
14 | public static class BTDef
15 | {
16 | public static readonly JsonSerializerSettings SerializerSettingsAll = new JsonSerializerSettings()
17 | {TypeNameHandling = TypeNameHandling.All, Formatting = Formatting.Indented};
18 |
19 | public static readonly JsonSerializerSettings SerializerSettingsAuto = new JsonSerializerSettings()
20 | {TypeNameHandling = TypeNameHandling.Auto};
21 | }
22 |
23 | public enum NodeState
24 | {
25 | Inactive,
26 | Running,
27 | Success,
28 | Failure
29 | }
30 |
31 | public enum BTLogType
32 | {
33 | Debug,
34 | Warning,
35 | Error
36 | }
37 |
38 | public enum AbortType
39 | {
40 | None,
41 | Self,
42 | LowerPriority,
43 | Both
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTDef.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cb128bad34f94a45afa5191a85173124
3 | timeCreated: 1695976395
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTEx.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTEx.cs
3 | // Brief: BTEx
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-05
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 | using BTCore.Runtime.Composites;
12 | using BTCore.Runtime.Decorators;
13 |
14 | namespace BTCore.Runtime
15 | {
16 | public static class BTEx
17 | {
18 | public static List GetChildrenGuids(this BTNode parent) {
19 | var children = new List();
20 | switch (parent) {
21 | case ParentNode parentNode: {
22 | children.AddRange(parentNode.ChildrenGuids);
23 | break;
24 | }
25 | case EntryNode entryNode: {
26 | if (!string.IsNullOrEmpty(entryNode.ChildGuid)) {
27 | children.Add(entryNode.ChildGuid);
28 | }
29 | break;
30 | }
31 | }
32 |
33 | return children;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTEx.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9bdbc7c6a970431484214ab50b169493
3 | timeCreated: 1696480262
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTLogger.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTLogger.cs
3 | // Brief: BTLogger
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime
13 | {
14 | public static class BTLogger
15 | {
16 | public static Action OnLogReceived;
17 |
18 | public static void Debug(string text, params object[] args) {
19 | var message = string.Format(text, args);
20 | OnLogReceived?.Invoke(message, BTLogType.Debug);
21 | }
22 |
23 | public static void Warning(string text, params object[] args) {
24 | var message = string.Format(text, args);
25 | OnLogReceived?.Invoke(message, BTLogType.Warning);
26 | }
27 |
28 | public static void Error(string text, params object[] args) {
29 | var message = string.Format(text, args);
30 | OnLogReceived?.Invoke(message, BTLogType.Error);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTLogger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c00a478b18046a09dd5c83a4da92172
3 | timeCreated: 1695988339
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d735193aef545c8b557495251aeaf40
3 | timeCreated: 1695986991
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTRuntime.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BTRuntime"
3 | }
4 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTRuntime.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 16a6c8a30b87ea844a4b0c5eb1fa6caa
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTSettings.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BTSettings.cs
3 | // Brief: BTSettings
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-20
8 | //============================================================
9 |
10 | namespace BTCore.Runtime
11 | {
12 | // TODO 缺少编辑器设置面板
13 | public class BTSettings
14 | {
15 | public bool RestartWhenComplete { get; set; } = false;
16 | }
17 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9afaaddc7ee4933bba27ddeaa63bfb9
3 | timeCreated: 1697793041
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/BTree.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f4cd0b7eab0586a4aa15fd575d21d5aa
3 | timeCreated: 1696158435
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3dc4a266850242118872e178672ec52a
3 | timeCreated: 1696931543
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards/Blackboard.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Blackboard.cs
3 | // Brief: Blackboard
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-09
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 |
12 | namespace BTCore.Runtime.Blackboards
13 | {
14 | public class Blackboard
15 | {
16 | public List Values { get; set; } = new();
17 |
18 | public BlackboardValue Find(string name) {
19 | var foundKey = Values.Find(key => key.Name == name);
20 |
21 | if (foundKey == null) {
22 | BTLogger.Error($"Find blackboard value failed, value Name: {name}");
23 | return null;
24 | }
25 |
26 | if (foundKey is not BlackboardValue blackboardValue) {
27 | BTLogger.Error($"Find blackboard value failed, expected: {typeof(T)} got: {foundKey.Type}");
28 | return null;
29 | }
30 |
31 | return blackboardValue;
32 | }
33 |
34 | public T GetValue(string name) {
35 | var blackboardValue = Find(name);
36 | return blackboardValue != null ? blackboardValue.Value : default;
37 | }
38 |
39 | public void SetValue(string name, T value) {
40 | var foundValue = Find(name);
41 | if (foundValue != null) {
42 | foundValue.Value = value;
43 | return;
44 | }
45 |
46 | var blackboardKey = new BlackboardValue(name);
47 | blackboardKey.Value = value;
48 | Values.Add(blackboardKey);
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards/Blackboard.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 825bbb979f034d98aaec87fed785b39c
3 | timeCreated: 1696842850
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards/BlackboardValue.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: BlackboardValue.cs
3 | // Brief: BlackboardValue
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-10
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime.Blackboards
13 | {
14 | public abstract class BlackboardValue
15 | {
16 | ///
17 | /// 对应黑板变量的名称(唯一)
18 | ///
19 | public string Name { get; }
20 | ///
21 | /// 对应黑板变量的类型
22 | ///
23 | public Type Type { get; }
24 |
25 | protected BlackboardValue(string name, Type type) {
26 | Name = name;
27 | Type = type;
28 | }
29 |
30 | public static BlackboardValue Create(Type type, string name) {
31 | return Activator.CreateInstance(type, name) as BlackboardValue;
32 | }
33 | }
34 |
35 | public class BlackboardValue : BlackboardValue
36 | {
37 | public T Value { get; set; }
38 |
39 | public BlackboardValue(string name) : base(name, typeof(T)) {
40 |
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards/BlackboardValue.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0294a724d9a25a945af14dff03c14d2d
3 | timeCreated: 1696927885
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards/PresetBlackboardValue.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: PresetBlackboardValue.cs
3 | // Brief: PresetBlackboardValue
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-10
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Blackboards
11 | {
12 | public class IntValue : BlackboardValue
13 | {
14 | public IntValue(string name) : base(name) {
15 | }
16 | }
17 |
18 | public class FloatValue : BlackboardValue
19 | {
20 | public FloatValue(string name) : base(name) {
21 | }
22 | }
23 |
24 | public class DoubleValue : BlackboardValue
25 | {
26 | public DoubleValue(string name) : base(name) {
27 | }
28 | }
29 |
30 | public class StringValue : BlackboardValue
31 | {
32 | public StringValue(string name) : base(name) {
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Blackboards/PresetBlackboardValue.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6ca97149fb46a984a8f728136cbb3222
3 | timeCreated: 1696931179
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7ad5910ee314e76a6fc21b1cf483f6f
3 | timeCreated: 1695989183
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Composite.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Composite.cs
3 | // Brief: 复合节点基类
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | using System;
11 | using System.Collections.Generic;
12 |
13 | namespace BTCore.Runtime.Composites
14 | {
15 | public abstract class Composite : ParentNode
16 | {
17 | public AbortType AbortType = AbortType.None;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Composite.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7337ca9adcf3494d9809c0764c7c2cc8
3 | timeCreated: 1695989210
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Parallel.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Parallel.cs
3 | // Brief: 并行节点:并行执行所有的子节点,所有的子节点都返回Success,并行节点才会返回Success。
4 | // 只要有一个子节点返回Failure,并行节点就会立刻返回Failure
5 | //
6 | // Author: Saroce, Saroce233@163.com
7 | //
8 | // Modified: 2023-09-30
9 | //============================================================
10 |
11 | using System;
12 | using System.Collections.Generic;
13 |
14 | namespace BTCore.Runtime.Composites
15 | {
16 | public class Parallel : Composite
17 | {
18 | private List _executionState = new();
19 |
20 | protected override void OnStart() {
21 | base.OnStart();
22 |
23 | Index = 0;
24 | _executionState = Children.ConvertAll(x => NodeState.Inactive);
25 | }
26 |
27 | protected override void OnStop() {
28 |
29 | }
30 |
31 | public override void OnChildStart() {
32 | _executionState[Index++] = NodeState.Running;
33 | }
34 |
35 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
36 | _executionState[childIndex] = nodeState;
37 | }
38 |
39 | public override bool CanExecute() {
40 | return Index < Children.Count;
41 | }
42 |
43 | public override void OnConditionalAbort(int index) {
44 | Index = 0;
45 | _executionState.ForEach(x => x = NodeState.Inactive);
46 | }
47 |
48 | ///
49 | /// 并行节点状态是由多个子节点状态决定的
50 | ///
51 | ///
52 | ///
53 | public override NodeState OverrideState(NodeState state) {
54 | var childRenComplete = true;
55 | for (var i = 0; i < _executionState.Count; i++) {
56 | if (_executionState[i] == NodeState.Running) {
57 | childRenComplete = false;
58 | }
59 | else if (_executionState[i] == NodeState.Failure) {
60 | return State = NodeState.Failure;
61 | }
62 | }
63 |
64 | return State = childRenComplete ? NodeState.Success : NodeState.Running;
65 | }
66 |
67 | public override bool CanRunParallel() {
68 | return true;
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Parallel.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 255390da934945979e428456ee12aa36
3 | timeCreated: 1696004239
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/RandomSelector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: RandomSelector.cs
3 | // Brief: RandomSelector
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-07-05
8 | //============================================================
9 |
10 | using System;
11 | using System.Collections.Generic;
12 |
13 | namespace BTCore.Runtime.Composites
14 | {
15 | public class RandomSelector : Composite
16 | {
17 | public int Seed { get; set; }
18 | public bool UseSeed { get; set; }
19 |
20 | public override int Index => _executionOrder.Count > 0 ? _executionOrder.Peek() : 0;
21 |
22 | private Random _random;
23 | private readonly List _childrenIndexes = new();
24 | private readonly Stack _executionOrder = new();
25 |
26 | protected override void OnInit() {
27 | _random = UseSeed ? new Random(Seed) : new Random();
28 |
29 | _childrenIndexes.Clear();
30 | for (var i = 0; i < Children.Count; i++) {
31 | _childrenIndexes.Add(i);
32 | }
33 | }
34 |
35 | protected override void OnStart() {
36 | base.OnStart();
37 | Shuffle();
38 | }
39 |
40 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
41 | if (_executionOrder.Count > 0) {
42 | _executionOrder.Pop();
43 | }
44 |
45 | State = nodeState;
46 | }
47 |
48 | public override bool CanExecute() {
49 | return _executionOrder.Count > 0 && State != NodeState.Success;
50 | }
51 |
52 | public override void OnConditionalAbort(int index) {
53 | Shuffle();
54 | State = NodeState.Running;
55 | }
56 |
57 | private void Shuffle() {
58 | _executionOrder.Clear();
59 | for (var i = _childrenIndexes.Count; i > 0; i--) {
60 | var j = _random.Next(0, i);
61 | var index = _childrenIndexes[j];
62 | _executionOrder.Push(index);
63 | _childrenIndexes[j] = _childrenIndexes[i - 1];
64 | _childrenIndexes[i - 1] = index;
65 | }
66 |
67 | foreach (var i in _executionOrder) {
68 | BTLogger.Debug($"随机序号:{i}");
69 | }
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/RandomSelector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e50560920abc409cb265ea02dd08f338
3 | timeCreated: 1720112758
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/RandomSequence.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 976d138783a94cfcbe9eea07b8311f8e
3 | timeCreated: 1720021235
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Selector.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Selector.cs
3 | // Brief: 选择节点:从左到右执行,当有子节点返回Success,选择节点就会立刻返回Success,
4 | // 不会执行下一个子节点,所有子节点都返回Failure,选择节点返回Failure
5 | //
6 | // Author: Saroce, Saroce233@163.com
7 | //
8 | // Modified: 2023-09-30
9 | //============================================================
10 |
11 | using System;
12 |
13 | namespace BTCore.Runtime.Composites
14 | {
15 | public class Selector : Composite
16 | {
17 | protected override void OnStart() {
18 | base.OnStart();
19 | Index = 0;
20 | }
21 |
22 | protected override void OnStop() {
23 |
24 | }
25 |
26 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
27 | State = nodeState switch {
28 | NodeState.Failure => ++Index >= Children.Count ? NodeState.Failure : NodeState.Running,
29 | _ => nodeState
30 | };
31 | }
32 |
33 | public override bool CanExecute() {
34 | return Index < Children.Count && State != NodeState.Success;
35 | }
36 |
37 | public override void OnConditionalAbort(int index) {
38 | Index = index;
39 | State = NodeState.Running;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Selector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8e2ccd0df3bc4b728634c1efec74e49f
3 | timeCreated: 1696003965
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Sequence.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Sequence.cs
3 | // Brief: 顺序节点: 从左到右挨个顺序执行,当所有子节点都返回Success时,它才返回Success。
4 | // 当某个子节点返回Failure时,顺序节点就会立刻返回Failure
5 | //
6 | // Author: Saroce, Saroce233@163.com
7 | //
8 | // Modified: 2023-09-29
9 | //============================================================
10 |
11 | using System;
12 |
13 | namespace BTCore.Runtime.Composites
14 | {
15 | public class Sequence : Composite
16 | {
17 | protected override void OnStart() {
18 | base.OnStart();
19 | Index = 0;
20 | }
21 |
22 | protected override void OnStop() {
23 |
24 | }
25 |
26 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
27 | Index++;
28 | State = nodeState switch {
29 | NodeState.Success => Index >= Children.Count ? NodeState.Success : NodeState.Running,
30 | _ => nodeState
31 | };
32 | }
33 |
34 | public override bool CanExecute() {
35 | return Index < Children.Count && State != NodeState.Failure;
36 | }
37 |
38 | public override void OnConditionalAbort(int index) {
39 | Index = index;
40 | State = NodeState.Running;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Composites/Sequence.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e1a0175b430f4cdcaa776d934010d6f8
3 | timeCreated: 1695989196
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Conditions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73e796fc5f0a4fafbd8743465e7f8c3a
3 | timeCreated: 1696156682
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Conditions/Condition.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Condition.cs
3 | // Brief: 条件节点基类
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Conditions
11 | {
12 | public abstract class Condition : BTNode
13 | {
14 | protected abstract bool Validate();
15 |
16 | protected override NodeState OnUpdate() {
17 | return Validate() ? NodeState.Success : NodeState.Failure;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Conditions/Condition.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9a70580c3cd5438182ff9f733686ccfa
3 | timeCreated: 1696156689
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Conditions/RandomProbability.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: RandomProbability.cs
3 | // Brief: RandomProbability
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-16
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime.Conditions
13 | {
14 | public class RandomProbability : Condition
15 | {
16 | public SharedValue Probability { get; set; } = new();
17 |
18 | private Random _random;
19 |
20 | protected override void OnStart() {
21 | base.OnStart();
22 | _random = new Random();
23 | }
24 |
25 | protected override void OnStop() {
26 |
27 | }
28 |
29 | protected override bool Validate() {
30 | var randomValue = _random.Next(0, 100);
31 | return randomValue < Probability.Value;
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Conditions/RandomProbability.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68e9f0584624484280f838483f42e171
3 | timeCreated: 1697437853
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9e03b4bfe6b4c8cbd7299f06a72f9be
3 | timeCreated: 1696150538
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Decorator.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Decorator.cs
3 | // Brief: 装饰节点基类
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime.Decorators
13 | {
14 | public abstract class Decorator : ParentNode
15 | {
16 | public virtual NodeState Decorate(NodeState state) {
17 | return state;
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Decorator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 32ef38cc498c432aa557c1f338b53c98
3 | timeCreated: 1696150673
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Failure.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Failure.cs
3 | // Brief: 失败节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Decorators
11 | {
12 | public class Failure : Decorator
13 | {
14 | protected override void OnStop() {
15 | base.OnStop();
16 | }
17 |
18 | public override bool CanExecute() {
19 | return State is NodeState.Inactive or NodeState.Running;
20 | }
21 |
22 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
23 | State = nodeState;
24 | }
25 |
26 | public override NodeState Decorate(NodeState state) {
27 | return state == NodeState.Success ? NodeState.Failure : state;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Failure.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 22b8976e23e04d49a31f35ed0643c2fd
3 | timeCreated: 1696150547
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Inverter.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Inverter.cs
3 | // Brief: 反转节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime.Decorators
13 | {
14 | public class Inverter : Decorator
15 | {
16 | protected override void OnStart() {
17 | base.OnStart();
18 | }
19 |
20 | protected override void OnStop() {
21 | }
22 |
23 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
24 | State = nodeState;
25 | }
26 |
27 | public override bool CanExecute() {
28 | return State is NodeState.Inactive or NodeState.Running;
29 | }
30 |
31 | public override NodeState Decorate(NodeState state) {
32 | return state switch {
33 | NodeState.Failure => NodeState.Success,
34 | NodeState.Success => NodeState.Failure,
35 | _ => state
36 | };
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Inverter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b5f48b56a460439d80356ebbc9506311
3 | timeCreated: 1696150849
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Repeater.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Repeater.cs
3 | // Brief: 重复节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Decorators
11 | {
12 | public class Repeater : Decorator
13 | {
14 | public int RepeatCount { get; set; } = 1; // 设定为负数,一直循环执行
15 |
16 | private int _counter = 0;
17 |
18 | protected override void OnStart() {
19 | base.OnStart();
20 | _counter = 0;
21 | }
22 |
23 | protected override void OnStop() {
24 |
25 | }
26 |
27 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
28 | // 一直运行状态
29 | if (RepeatCount == -1) {
30 | State = NodeState.Running;
31 | return;
32 | }
33 |
34 | if (_counter >= RepeatCount) {
35 | State = NodeState.Success;
36 | }
37 |
38 | _counter++;
39 | State = nodeState != NodeState.Success ? nodeState : NodeState.Running;
40 | }
41 |
42 | public override bool CanExecute() {
43 | return RepeatCount == -1 || _counter < RepeatCount;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Repeater.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a951396f178244848b8d48dfa230238a
3 | timeCreated: 1696155109
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Success.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: Success.cs
3 | // Brief: 成功节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Decorators
11 | {
12 | public class Success : Decorator
13 | {
14 |
15 | protected override void OnStop() {
16 | }
17 |
18 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
19 | State = nodeState;
20 | }
21 |
22 | public override bool CanExecute() {
23 | return State is NodeState.Inactive or NodeState.Running;
24 | }
25 |
26 | public override NodeState Decorate(NodeState state) {
27 | return state == NodeState.Failure ? NodeState.Success : state;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/Success.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c39b72eabb3c4bcdba7a7cca3b4633af
3 | timeCreated: 1696156151
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/UntilSuccess.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: UntilSuccess.cs
3 | // Brief: UntilSuccess
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-25
8 | //============================================================
9 |
10 | namespace BTCore.Runtime.Decorators
11 | {
12 | public class UntilSuccess : Decorator
13 | {
14 | protected override void OnStop() {
15 |
16 | }
17 |
18 | public override void OnChildExecute(int childIndex, NodeState nodeState) {
19 | State = nodeState;
20 | }
21 |
22 | public override bool CanExecute() {
23 | return State != NodeState.Success;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Decorators/UntilSuccess.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 368344b449a5475bb2cb268f89b948e1
3 | timeCreated: 1698244092
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/EntryNode.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: EntryNode.cs
3 | // Brief: 行为树入口节点
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-01
8 | //============================================================
9 |
10 | using System;
11 |
12 | namespace BTCore.Runtime
13 | {
14 | public class EntryNode : BTNode
15 | {
16 | private BTNode _child;
17 |
18 | public string ChildGuid { get; set; }
19 |
20 | public void SetChild(BTNode node) {
21 | _child = node;
22 | }
23 |
24 | public BTNode GetChild() => _child;
25 |
26 | protected override void OnStart() {
27 | base.OnStart();
28 | }
29 |
30 | protected override NodeState OnUpdate() {
31 | return _child?.Update() ?? NodeState.Failure;
32 | }
33 |
34 | protected override void OnStop() {
35 |
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/EntryNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c33f429f9944bbd8a97394ad77cba85
3 | timeCreated: 1696157919
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f0fc5e34d4db4aeebc221f492db1ab86
3 | timeCreated: 1697611956
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals/ExternalAction.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ExternalAction.cs
3 | // Brief: ExternalAction
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 | using System.Linq;
12 | using BTCore.Runtime.Actions;
13 |
14 | namespace BTCore.Runtime.Externals
15 | {
16 | public class ExternalAction : Action, IExternalNode
17 | {
18 | public string TypeName { get; set; }
19 |
20 | public Dictionary Properties { get; set; } = new Dictionary();
21 |
22 | protected override void OnStart() {
23 | base.OnStart();
24 | }
25 |
26 | ///
27 | /// 外部Action节点需重写此方法
28 | ///
29 | ///
30 | protected override NodeState OnUpdate() {
31 | return NodeState.Failure;
32 | }
33 |
34 | protected override void OnStop() {
35 |
36 | }
37 |
38 | public override string ToString() {
39 | var propertiesDump = Properties.Aggregate("Properties: ", (current, pair) => current + $"key: {pair.Key} value: {pair.Value}");
40 | return $"External condition typeName: {TypeName} {propertiesDump}";
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals/ExternalAction.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e3253bf2a37411caa0f109e8f647e59
3 | timeCreated: 1697612438
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals/ExternalCondition.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ExternalCondition.cs
3 | // Brief: ExternalCondition
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 | using System.Linq;
12 | using BTCore.Runtime.Conditions;
13 |
14 | namespace BTCore.Runtime.Externals
15 | {
16 | public class ExternalCondition : Condition, IExternalNode
17 | {
18 | public string TypeName { get; set; }
19 |
20 | public Dictionary Properties { get; set; } = new Dictionary();
21 |
22 | protected override void OnStart() {
23 | base.OnStart();
24 | }
25 |
26 | protected override void OnStop() {
27 |
28 | }
29 |
30 | ///
31 | /// 外部Condition节点需重写此方法
32 | ///
33 | ///
34 | protected override bool Validate() {
35 | return false;
36 | }
37 |
38 | public override string ToString() {
39 | var propertiesDump = Properties.Aggregate("Properties: ", (current, pair) => current + $"key: {pair.Key} value: {pair.Value}");
40 | return $"External condition typeName: {TypeName} {propertiesDump}";
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals/ExternalCondition.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 002e66260c9c4202addf3b7b8069754d
3 | timeCreated: 1697621561
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals/IExternalNode.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: IExternalNode.cs
3 | // Brief: IExternalNode
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 |
12 | namespace BTCore.Runtime.Externals
13 | {
14 | public interface IExternalNode
15 | {
16 | ///
17 | /// 对应外部节点类型名称
18 | ///
19 | string TypeName { get; set; }
20 | ///
21 | /// PropertyValue统一用string存储,外部工程直接使用Convert转换为对应需要类型
22 | /// 主要用来传递基本类型数据,特定工程的类型实例数据请使用黑板来传递
23 | ///
24 | Dictionary Properties { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/Externals/IExternalNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3b59782bd664a16a4b36cb08ff289a8
3 | timeCreated: 1697612700
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/INode.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: INode.cs
3 | // Brief: INode
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-09-29
8 | //============================================================
9 |
10 | namespace BTCore.Runtime
11 | {
12 | public interface INode
13 | {
14 | string Name { get; set; }
15 |
16 | string Guid { get; set; }
17 |
18 | string Comment { get; set; }
19 |
20 | #if UNITY_EDITOR
21 | float PosX { get; set; }
22 |
23 | float PosY { get; set; }
24 | #endif
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/INode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 78a4f1f769604c70bfeea5a0f9eeedf2
3 | timeCreated: 1695978353
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/OtherNodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec48486464a7451881b078c001f2e568
3 | timeCreated: 1719459252
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/OtherNodes/GroupNode.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: GroupNode.cs
3 | // Brief: GroupNode
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-27
8 | //============================================================
9 | #if UNITY_EDITOR
10 | using System.Collections.Generic;
11 | using UnityEngine;
12 |
13 | namespace BTCore.Runtime.OtherNodes
14 | {
15 | public class GroupNode
16 | {
17 | public string Title;
18 | public float X;
19 | public float Y;
20 | public float Width;
21 | public float Height;
22 | public GroupColor GroupColor;
23 | public readonly List NodeGuids = new();
24 | }
25 |
26 | public class GroupColor
27 | {
28 | public float R;
29 | public float G;
30 | public float B;
31 | public float A;
32 |
33 | public GroupColor(Color color) {
34 | R = color.r;
35 | G = color.g;
36 | B = color.b;
37 | A = color.a;
38 | }
39 |
40 | public static implicit operator Color(GroupColor groupColor) {
41 | return new Color(groupColor.R, groupColor.G, groupColor.B, groupColor.A);
42 | }
43 | }
44 | }
45 | #endif
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/OtherNodes/GroupNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 807fc5207bb44b20b12185cc3aaccc73
3 | timeCreated: 1719470877
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/OtherNodes/StickNoteNode.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: StickNoteData.cs
3 | // Brief: StickNoteData
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-27
8 | //============================================================
9 | #if UNITY_EDITOR
10 |
11 | namespace BTCore.Runtime.OtherNodes
12 | {
13 | public class StickNoteNode
14 | {
15 | public string Title;
16 | public string Content;
17 | public float X;
18 | public float Y;
19 | public float Width;
20 | public float Height;
21 | }
22 | }
23 | #endif
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/OtherNodes/StickNoteNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b68f3329800047d6a136956ccda1b934
3 | timeCreated: 1719458521
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/ParentNode.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ParentNode.cs
3 | // Brief: ParentNode
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-04-16
8 | //============================================================
9 |
10 | using System.Collections.Generic;
11 |
12 | namespace BTCore.Runtime
13 | {
14 | public abstract class ParentNode : BTNode
15 | {
16 | public virtual int Index { get; protected set; }
17 | public List ChildrenGuids { get; set; } = new();
18 |
19 | protected List Children { get; } = new();
20 |
21 | public List GetChildren() => Children;
22 |
23 | public virtual void OnChildStart() { }
24 | public virtual void OnConditionalAbort(int index) { }
25 |
26 | public abstract void OnChildExecute(int childIndex, NodeState nodeState);
27 |
28 | public abstract bool CanExecute();
29 |
30 | public virtual bool CanRunParallel() { return false; }
31 |
32 | public virtual NodeState OverrideState(NodeState state) { return state; }
33 |
34 | public void AddChild(BTNode child) {
35 | Children.Add(child);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/ParentNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3e5c430029b84e428431817d4aaba82c
3 | timeCreated: 1713231246
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/SharedValue.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: SharedValue.cs
3 | // Brief: SharedValue
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-11
8 | //============================================================
9 |
10 | using BTCore.Runtime.Blackboards;
11 |
12 | namespace BTCore.Runtime
13 | {
14 | public abstract class SharedValue
15 | {
16 | protected Blackboard Blackboard { get; set; }
17 | }
18 |
19 | public class SharedValue : SharedValue
20 | {
21 | public string ValueName { get; set; }
22 | public T RawValue { get; set; }
23 |
24 | public T Value {
25 | get {
26 | if (string.IsNullOrEmpty(ValueName) || Blackboard == null) {
27 | return RawValue;
28 | }
29 |
30 | return Blackboard.GetValue(ValueName);
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Assets/BTCore/Runtime/SharedValue.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b51c54de188e4594baf267dec54f069d
3 | timeCreated: 1697032039
--------------------------------------------------------------------------------
/Assets/Examples.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa49e5179e8b3484b96e7fa57fdd3b0f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Examples/AbortType.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06e54cb5e79c4d08ace83fd638b1eedf
3 | timeCreated: 1718934977
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionAttack.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ActionAttack.cs
3 | // Brief: ActionAttack
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-21
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Actions;
12 | using UnityEngine;
13 |
14 | namespace Examples.AbortType
15 | {
16 | public class ActionAttack : Action
17 | {
18 | private float _startTime;
19 | private float _duration = 2000;
20 |
21 | protected override void OnStart() {
22 | base.OnStart();
23 | Debug.Log("==============正式攻击开始=============");
24 | _startTime = Time.time;
25 | }
26 |
27 | protected override NodeState OnUpdate() {
28 | var elapseTime = (Time.time - _startTime) * 1000;
29 | return elapseTime > _duration ? NodeState.Success : NodeState.Running;
30 | }
31 |
32 | protected override void OnStop() {
33 | Debug.Log("==============正式攻击结束=============");
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionAttack.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8015a5ab99714d93abefce6bc60b5354
3 | timeCreated: 1718938816
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionSkill.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ActionSkill.cs
3 | // Brief: ActionSkill
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-21
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Actions;
12 | using UnityEngine;
13 |
14 | namespace Examples.AbortType
15 | {
16 | public class ActionSkill : Action
17 | {
18 | private float _startTime;
19 | private float _duration = 2000;
20 |
21 | protected override void OnStart() {
22 | base.OnStart();
23 | Debug.Log("==============正式施法开始=============");
24 | _startTime = Time.time;
25 | }
26 |
27 | protected override NodeState OnUpdate() {
28 | var elapseTime = (Time.time - _startTime) * 1000;
29 | return elapseTime > _duration ? NodeState.Success : NodeState.Running;
30 | }
31 |
32 | protected override void OnStop() {
33 | Debug.Log("==============正式施法结束=============");
34 | // State = NodeState.Inactive;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionSkill.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 826dff442ea64c778fcf7efb3d87eaf9
3 | timeCreated: 1718937977
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionWait.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ActionWait.cs
3 | // Brief: ActionWait
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-21
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Actions;
12 | using UnityEngine;
13 |
14 | namespace Examples.AbortType
15 | {
16 | public class ActionWait : Action
17 | {
18 | private float _startTime;
19 | private float _duration = 2000;
20 |
21 | protected override void OnStart() {
22 | base.OnStart();
23 | Debug.Log("==============施法前摇开始=============");
24 | _startTime = Time.time;
25 |
26 | }
27 |
28 | protected override NodeState OnUpdate() {
29 | var elapseTime = (Time.time - _startTime) * 1000;
30 | return elapseTime > _duration ? NodeState.Success : NodeState.Running;
31 | }
32 |
33 | protected override void OnStop() {
34 | Debug.Log("==============施法前摇结束=============");
35 | // State = NodeState.Inactive;
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionWait.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a7e210635724ccdae6ef734d98cf1ff
3 | timeCreated: 1718937766
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionWork.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ActionWork.cs
3 | // Brief: ActionWork
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-21
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Actions;
12 | using UnityEngine;
13 |
14 | namespace Examples.AbortType
15 | {
16 | public class ActionWork : Action
17 | {
18 | private float _startTime;
19 | private float _duration = 5000;
20 |
21 | protected override void OnStart() {
22 | base.OnStart();
23 | Debug.Log("==============正式Work开始=============");
24 | _startTime = Time.time;
25 | }
26 |
27 | protected override NodeState OnUpdate() {
28 | var elapseTime = (Time.time - _startTime) * 1000;
29 | return elapseTime > _duration ? NodeState.Success : NodeState.Running;
30 | }
31 |
32 | protected override void OnStop() {
33 | Debug.Log("==============正式Work结束=============");
34 | // State = NodeState.Inactive;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ActionWork.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad4245647d0147688ab4c0e5bdda144f
3 | timeCreated: 1718938874
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ConditionHP.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ConditionHP.cs
3 | // Brief: ConditionHP
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-21
8 | //============================================================
9 |
10 | using BTCore.Runtime.Conditions;
11 |
12 | namespace Examples.AbortType
13 | {
14 | public class ConditionHP : Condition
15 | {
16 | protected override bool Validate() {
17 | var haveHP = Blackboard.GetValue("HP");
18 | return haveHP > 100;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ConditionHP.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f6627021457c4821965afbb941a5cbce
3 | timeCreated: 1718938760
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ConditionMP.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ConditionMP.cs
3 | // Brief: ConditionMP
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2024-06-21
8 | //============================================================
9 |
10 | using BTCore.Runtime.Conditions;
11 |
12 | namespace Examples.AbortType
13 | {
14 | public class ConditionMP : Condition
15 | {
16 | protected override bool Validate() {
17 | var haveMP = Blackboard.GetValue("MP");
18 | return haveMP > 100;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Assets/Examples/AbortType/ConditionMP.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cafb22ce07a0401e94937a677bad72a8
3 | timeCreated: 1718934999
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 622a00549f9d4b05a1fd71e5c8ee6a4d
3 | timeCreated: 1697681304
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/AIAgent.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: AIAgent.cs
3 | // Brief: AIAgent
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 |
12 | namespace Examples.ExternalNode
13 | {
14 | public interface IAIAgent
15 | {
16 | void Tick();
17 | }
18 |
19 | public class AIAgent : IAIAgent
20 | {
21 | private readonly BTree _btTree;
22 |
23 | public AIAgent(BTree btTree) {
24 | _btTree = btTree;
25 | }
26 |
27 | public void Tick() {
28 | _btTree?.Update();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/AIAgent.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bbca55a908d64a7e8fc2b17146ed3a4f
3 | timeCreated: 1697636667
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/AIService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e83ce1926fea4a3f880f1ae2fefb2595
3 | timeCreated: 1697636873
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/ExternalNodeTree.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: ExternalNodeTree.cs
3 | // Brief: 外部节点类型使用测试
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using UnityEngine;
12 |
13 | namespace Examples.ExternalNode
14 | {
15 | public class ExternalNodeTree : MonoBehaviour
16 | {
17 | [SerializeField]
18 | private TextAsset _btAsset;
19 |
20 | private IAIAgent _aiAgent;
21 | private readonly IAIService _aiService = new AIService();
22 |
23 | private void Start() {
24 | BTLogger.OnLogReceived += OnLogReceived;
25 | _aiAgent = _aiService.CreateAIAgent(_btAsset.text);
26 | }
27 |
28 | private void Update() {
29 | _aiAgent?.Tick();
30 | }
31 |
32 | private void OnLogReceived(string message, BTLogType logType) {
33 | switch (logType) {
34 | case BTLogType.Debug:
35 | Debug.Log(message);
36 | break;
37 | case BTLogType.Warning:
38 | Debug.LogWarning(message);
39 | break;
40 | case BTLogType.Error:
41 | Debug.LogError(message);
42 | break;
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/ExternalNodeTree.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9a9608d1bd8d48ae915348a6b1c19bad
3 | timeCreated: 1697643262
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/MyAction.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: MyAction.cs
3 | // Brief: MyAction
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using BTCore.Runtime;
11 | using BTCore.Runtime.Externals;
12 |
13 | namespace Examples.ExternalNode
14 | {
15 | ///
16 | /// 测试类型,实际项目中需要替换为外部工程中的Action类型
17 | ///
18 | public class MyAction : ExternalAction
19 | {
20 | private string _name;
21 |
22 | protected override void OnStart() {
23 | base.OnStart();
24 | _name = Properties["Name"];
25 | }
26 |
27 | protected override NodeState OnUpdate() {
28 | BTLogger.Debug(_name);
29 | return NodeState.Success;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/MyAction.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2cc8de79b8904b6885709c7b12142890
3 | timeCreated: 1697638984
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/MyCondition.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // File: MyCondition.cs
3 | // Brief: MyCondition
4 | //
5 | // Author: Saroce, Saroce233@163.com
6 | //
7 | // Modified: 2023-10-18
8 | //============================================================
9 |
10 | using System;
11 | using BTCore.Runtime.Externals;
12 |
13 | namespace Examples.ExternalNode
14 | {
15 | ///
16 | /// 测试类型,实际项目中需要替换为外部工程中的Condition类型
17 | ///
18 | public class MyCondition : ExternalCondition
19 | {
20 | private bool _canPass;
21 |
22 | protected override void OnStart() {
23 | // 读取节点配置数据
24 | _canPass = Convert.ToBoolean(Properties["CanPass"]);
25 | }
26 |
27 | protected override bool Validate() {
28 | return _canPass;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Assets/Examples/ExternalNode/MyCondition.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af044ed7895242ca822074c765d12589
3 | timeCreated: 1697638687
--------------------------------------------------------------------------------
/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e292d9937e17e59428990bb0402d96f6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b9673144d16d0b34d9a50bdc3e09d928
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c0ce3f936511da6448149dc5ae6b8006
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEditor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a30c29a32b9c3a54e96eb6e8ccad56c5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5651992cdad94894a3af7dc3f1da9170
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 1
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 0
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 0
24 | Exclude PSM: 0
25 | Exclude PSP2: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude WiiU: 0
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 0
33 | Exclude XboxOne: 0
34 | Exclude iOS: 0
35 | Exclude tvOS: 0
36 | Editor:
37 | enabled: 0
38 | settings:
39 | DefaultValueInitialized: true
40 | N3DS:
41 | enabled: 1
42 | settings: {}
43 | PS4:
44 | enabled: 1
45 | settings: {}
46 | PSM:
47 | enabled: 1
48 | settings: {}
49 | PSP2:
50 | enabled: 1
51 | settings: {}
52 | SamsungTV:
53 | enabled: 1
54 | settings: {}
55 | Tizen:
56 | enabled: 1
57 | settings: {}
58 | WebGL:
59 | enabled: 1
60 | settings: {}
61 | WiiU:
62 | enabled: 1
63 | settings: {}
64 | WindowsStoreApps:
65 | enabled: 1
66 | settings:
67 | CPU: AnyCPU
68 | XboxOne:
69 | enabled: 1
70 | settings: {}
71 | iOS:
72 | enabled: 1
73 | settings: {}
74 | tvOS:
75 | enabled: 1
76 | settings: {}
77 | userData:
78 | assetBundleName:
79 | assetBundleVariant:
80 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5978f8f3dd274e848fbb7a123bde1fb9
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 1
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 0
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 0
24 | Exclude PSM: 0
25 | Exclude PSP2: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude WiiU: 0
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 0
33 | Exclude XboxOne: 0
34 | Exclude iOS: 0
35 | Exclude tvOS: 0
36 | Editor:
37 | enabled: 0
38 | settings:
39 | DefaultValueInitialized: true
40 | N3DS:
41 | enabled: 1
42 | settings: {}
43 | PS4:
44 | enabled: 1
45 | settings: {}
46 | PSM:
47 | enabled: 1
48 | settings: {}
49 | PSP2:
50 | enabled: 1
51 | settings: {}
52 | SamsungTV:
53 | enabled: 1
54 | settings: {}
55 | Tizen:
56 | enabled: 1
57 | settings: {}
58 | WebGL:
59 | enabled: 1
60 | settings: {}
61 | WiiU:
62 | enabled: 1
63 | settings: {}
64 | WindowsStoreApps:
65 | enabled: 1
66 | settings:
67 | CPU: AnyCPU
68 | XboxOne:
69 | enabled: 1
70 | settings: {}
71 | iOS:
72 | enabled: 1
73 | settings: {}
74 | tvOS:
75 | enabled: 1
76 | settings: {}
77 | userData:
78 | assetBundleName:
79 | assetBundleVariant:
80 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5830a0195677bc54690e90f4dc6587ef
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d2a8f0021d6b47c5923d8972dfb81ef1
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Android:
12 | enabled: 1
13 | settings: {}
14 | Any:
15 | enabled: 0
16 | settings:
17 | Exclude Android: 0
18 | Exclude Editor: 1
19 | Exclude Linux: 0
20 | Exclude Linux64: 0
21 | Exclude LinuxUniversal: 0
22 | Exclude N3DS: 1
23 | Exclude OSXIntel: 0
24 | Exclude OSXIntel64: 0
25 | Exclude OSXUniversal: 0
26 | Exclude PS4: 1
27 | Exclude PSM: 1
28 | Exclude PSP2: 1
29 | Exclude SamsungTV: 1
30 | Exclude Tizen: 1
31 | Exclude WebGL: 1
32 | Exclude WiiU: 1
33 | Exclude Win: 0
34 | Exclude Win64: 0
35 | Exclude WindowsStoreApps: 1
36 | Exclude XboxOne: 1
37 | Exclude iOS: 1
38 | Exclude tvOS: 1
39 | Editor:
40 | enabled: 0
41 | settings:
42 | DefaultValueInitialized: true
43 | Linux:
44 | enabled: 1
45 | settings: {}
46 | Linux64:
47 | enabled: 1
48 | settings: {}
49 | LinuxUniversal:
50 | enabled: 1
51 | settings: {}
52 | OSXIntel:
53 | enabled: 1
54 | settings: {}
55 | OSXIntel64:
56 | enabled: 1
57 | settings: {}
58 | OSXUniversal:
59 | enabled: 1
60 | settings: {}
61 | PSM:
62 | enabled: 0
63 | settings: {}
64 | Win:
65 | enabled: 1
66 | settings: {}
67 | Win64:
68 | enabled: 1
69 | settings: {}
70 | WindowsStoreApps:
71 | enabled: 0
72 | settings:
73 | CPU: AnyCPU
74 | userData:
75 | assetBundleName:
76 | assetBundleVariant:
77 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e0a9643dc0d4b46bf2321f72c4e503e
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Android:
12 | enabled: 1
13 | settings: {}
14 | Any:
15 | enabled: 0
16 | settings:
17 | Exclude Android: 0
18 | Exclude Editor: 1
19 | Exclude Linux: 0
20 | Exclude Linux64: 0
21 | Exclude LinuxUniversal: 0
22 | Exclude N3DS: 1
23 | Exclude OSXIntel: 0
24 | Exclude OSXIntel64: 0
25 | Exclude OSXUniversal: 0
26 | Exclude PS4: 1
27 | Exclude PSM: 1
28 | Exclude PSP2: 1
29 | Exclude SamsungTV: 1
30 | Exclude Tizen: 1
31 | Exclude WebGL: 1
32 | Exclude WiiU: 1
33 | Exclude Win: 0
34 | Exclude Win64: 0
35 | Exclude WindowsStoreApps: 1
36 | Exclude XboxOne: 1
37 | Exclude iOS: 1
38 | Exclude tvOS: 1
39 | Editor:
40 | enabled: 0
41 | settings:
42 | DefaultValueInitialized: true
43 | Linux:
44 | enabled: 1
45 | settings: {}
46 | Linux64:
47 | enabled: 1
48 | settings: {}
49 | LinuxUniversal:
50 | enabled: 1
51 | settings: {}
52 | OSXIntel:
53 | enabled: 1
54 | settings: {}
55 | OSXIntel64:
56 | enabled: 1
57 | settings: {}
58 | OSXUniversal:
59 | enabled: 1
60 | settings: {}
61 | PSM:
62 | enabled: 0
63 | settings: {}
64 | Win:
65 | enabled: 1
66 | settings: {}
67 | Win64:
68 | enabled: 1
69 | settings: {}
70 | WindowsStoreApps:
71 | enabled: 0
72 | settings:
73 | CPU: AnyCPU
74 | userData:
75 | assetBundleName:
76 | assetBundleVariant:
77 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 47a84ebde4ec47fabb620b30cc7a3e5c
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings:
14 | Exclude Android: 0
15 | Exclude Editor: 0
16 | Exclude Linux: 0
17 | Exclude Linux64: 0
18 | Exclude LinuxUniversal: 0
19 | Exclude N3DS: 0
20 | Exclude OSXIntel: 0
21 | Exclude OSXIntel64: 0
22 | Exclude OSXUniversal: 0
23 | Exclude PS4: 0
24 | Exclude PSM: 0
25 | Exclude PSP2: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude WiiU: 0
30 | Exclude Win: 0
31 | Exclude Win64: 0
32 | Exclude WindowsStoreApps: 0
33 | Exclude XboxOne: 0
34 | Exclude iOS: 0
35 | Exclude tvOS: 0
36 | Editor:
37 | enabled: 0
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 47a84ebde4ec47fabb620b30cc7a096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4865f1ab4504ed8a368670db22f409c
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 0
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 1
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 1
24 | Exclude PSM: 1
25 | Exclude PSP2: 1
26 | Exclude SamsungTV: 1
27 | Exclude Tizen: 1
28 | Exclude WebGL: 1
29 | Exclude WiiU: 1
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 1
33 | Exclude XboxOne: 1
34 | Exclude iOS: 1
35 | Exclude tvOS: 1
36 | Editor:
37 | enabled: 1
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4865f1ab4504ed8a368670db22f096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: afbf832bc46149f5a291e87cab63e46d
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 0
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 1
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 1
24 | Exclude PSM: 1
25 | Exclude PSP2: 1
26 | Exclude SamsungTV: 1
27 | Exclude Tizen: 1
28 | Exclude WebGL: 1
29 | Exclude WiiU: 1
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 1
33 | Exclude XboxOne: 1
34 | Exclude iOS: 1
35 | Exclude tvOS: 1
36 | Editor:
37 | enabled: 1
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sirenix.OdinValidator.Editor
5 |
6 |
7 |
8 |
9 | Result can be null.
10 |
11 |
12 |
13 |
14 | Result will be null if the object is deleted.
15 |
16 |
17 |
18 |
19 | Defines the ODIN_VALIDATOR symbol.
20 |
21 |
22 |
23 |
24 |
25 | Apply this to an assembly to register validation rules for the validation system.
26 | This enables locating of all relevant validator types very quickly.
27 |
28 |
29 | Only use this to register types derived from Validator! It is important to understand
30 | that a rule is simply a serialized Validator instance that can be enabled, disabled,
31 | and have its contained values modified from the rules management GUI in the Odin Validator
32 | window.
33 |
34 | Read our Odin Validator tutorials for more information.
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.OdinValidator.Editor.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: afbf832bc46149f5a291e87cab63096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74721b9f0af448f5ae2e91102a1a5edd
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 1
13 | settings:
14 | Exclude Android: 0
15 | Exclude Editor: 0
16 | Exclude Linux: 0
17 | Exclude Linux64: 0
18 | Exclude LinuxUniversal: 0
19 | Exclude N3DS: 0
20 | Exclude OSXIntel: 0
21 | Exclude OSXIntel64: 0
22 | Exclude OSXUniversal: 0
23 | Exclude PS4: 0
24 | Exclude PSM: 0
25 | Exclude PSP2: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude WiiU: 0
30 | Exclude Win: 0
31 | Exclude Win64: 0
32 | Exclude WindowsStoreApps: 0
33 | Exclude XboxOne: 0
34 | Exclude iOS: 0
35 | Exclude tvOS: 0
36 | Editor:
37 | enabled: 0
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74721b9f0af448f5ae2e91102a1a096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f3147f7af4c49739579b966c458f5e4
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 0
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 1
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 1
24 | Exclude PSM: 1
25 | Exclude PSP2: 1
26 | Exclude SamsungTV: 1
27 | Exclude Tizen: 1
28 | Exclude WebGL: 1
29 | Exclude WiiU: 1
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 1
33 | Exclude XboxOne: 1
34 | Exclude iOS: 1
35 | Exclude tvOS: 1
36 | Editor:
37 | enabled: 1
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Serialization.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f3147f7af4c49739579b966c458096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c65184932ff4fd48a343e2360256baf
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 0
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 1
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 1
24 | Exclude PSM: 1
25 | Exclude PSP2: 1
26 | Exclude SamsungTV: 1
27 | Exclude Tizen: 1
28 | Exclude WebGL: 1
29 | Exclude WiiU: 1
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 1
33 | Exclude XboxOne: 1
34 | Exclude iOS: 1
35 | Exclude tvOS: 1
36 | Editor:
37 | enabled: 1
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c65184932ff4fd48a343e236025096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4873f2a8bdae42baa0406e8a61366ca1
3 | timeCreated: 1488828285
4 | PluginImporter:
5 | serializedVersion: 1
6 | iconMap: {}
7 | executionOrder: {}
8 | isPreloaded: 0
9 | isOverridable: 0
10 | platformData:
11 | Any:
12 | enabled: 0
13 | settings:
14 | Exclude Android: 1
15 | Exclude Editor: 0
16 | Exclude Linux: 1
17 | Exclude Linux64: 1
18 | Exclude LinuxUniversal: 1
19 | Exclude N3DS: 1
20 | Exclude OSXIntel: 1
21 | Exclude OSXIntel64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude PS4: 1
24 | Exclude PSM: 1
25 | Exclude PSP2: 1
26 | Exclude SamsungTV: 1
27 | Exclude Tizen: 1
28 | Exclude WebGL: 1
29 | Exclude WiiU: 1
30 | Exclude Win: 1
31 | Exclude Win64: 1
32 | Exclude WindowsStoreApps: 1
33 | Exclude XboxOne: 1
34 | Exclude iOS: 1
35 | Exclude tvOS: 1
36 | Editor:
37 | enabled: 1
38 | settings:
39 | DefaultValueInitialized: true
40 | WindowsStoreApps:
41 | enabled: 0
42 | settings:
43 | CPU: AnyCPU
44 | userData:
45 | assetBundleName:
46 | assetBundleVariant:
47 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4873f2a8bdae42baa0406e8a6136096f
3 | timeCreated: 1488828285
4 | DefaultImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/link.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Assemblies/link.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1bec01331befdea4d9ed9033eabd68f8
3 | timeCreated: 1613046886
4 | TextScriptImporter:
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Demos.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0e25832ebec7904fae40a54d8ec2c52
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1eb9585610cd5424fb583adf003e0b0b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ab9abef2e9a4e348b45e694feabc492
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b1d689be19c6bbb4b9194c1cc880e66d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt:
--------------------------------------------------------------------------------
1 | Odin Inspector makes use of the Bootstrap icon library.
2 | The library has been packed into the SdfIconAtlas.png
3 | file as SDF data.
4 |
5 | Bootstrap is released under the following license:
6 |
7 | ---
8 |
9 | The MIT License (MIT)
10 |
11 | Copyright (c) 2011-2018 Twitter, Inc.
12 | Copyright (c) 2011-2018 The Bootstrap Authors
13 |
14 | Permission is hereby granted, free of charge, to any person obtaining a copy
15 | of this software and associated documentation files (the "Software"), to deal
16 | in the Software without restriction, including without limitation the rights
17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18 | copies of the Software, and to permit persons to whom the Software is
19 | furnished to do so, subject to the following conditions:
20 |
21 | The above copyright notice and this permission notice shall be included in
22 | all copies or substantial portions of the Software.
23 |
24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30 | THE SOFTWARE.
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/Bootstrap License.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3fdc67fad3e362e47b5dd365a0bbdd7f
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/ConfigData.bytes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90eaa0dc28c1934408dc1c02e13a507f
3 | timeCreated: 1628274352
4 | licenseType: Free
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_PrefabParentObject: {fileID: 0}
7 | m_PrefabInternal: {fileID: 0}
8 | m_GameObject: {fileID: 0}
9 | m_Enabled: 1
10 | m_EditorHideFlags: 0
11 | m_Script: {fileID: -262940062, guid: a4865f1ab4504ed8a368670db22f409c, type: 3}
12 | m_Name: OdinPathLookup
13 | m_EditorClassIdentifier:
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 08379ccefc05200459f90a1c0711a340
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Odin Inspector/Assets/Editor/SdfIconAtlas.png
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 88ed3bf284fda27478775380d00ac961
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7329d15d08e289f4ba455b2448b859d9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: -645759843, guid: a4865f1ab4504ed8a368670db22f409c, type: 3}
13 | m_Name: GeneralDrawerConfig
14 | m_EditorClassIdentifier:
15 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7a87c41f9a8af54c8f04104b782c26c
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 1137305049, guid: a4865f1ab4504ed8a368670db22f409c, type: 3}
13 | m_Name: InspectorConfig
14 | m_EditorClassIdentifier:
15 | enableOdinInInspector: 1
16 | defaultEditorBehaviour: 11
17 | processMouseMoveInInspector: 1
18 | drawingConfig:
19 | configs: []
20 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dece80a9b0f27e444a23150a3b422b60
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: -228747253, guid: a4865f1ab4504ed8a368670db22f409c, type: 3}
13 | m_Name: OdinModuleConfig
14 | m_EditorClassIdentifier:
15 | configurations: []
16 | ModuleTogglingSettings: 0
17 | ModuleUpdateSettings: 0
18 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63d01993dace8dd4498c77d3720626cf
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e2e10e7838e88e04f8387b35cdff8d0d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c0ebedc05a82f748b7c1e4ad8f2ae65
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 1549551891, guid: 74721b9f0af448f5ae2e91102a1a5edd, type: 3}
13 | m_Name: GlobalSerializationConfig
14 | m_EditorClassIdentifier:
15 | HideSerializationCautionaryMessage: 1
16 | HidePrefabCautionaryMessage: 0
17 | HideOdinSerializeAttributeWarningMessages: 0
18 | HideNonSerializedShowInInspectorWarningMessages: 0
19 | buildSerializationFormat: 0
20 | editorSerializationFormat: 2
21 | loggingPolicy: 0
22 | errorHandlingPolicy: 0
23 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c09242af7a3742d499203fd6fe275f73
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0fc62969c0cebd340a0de92ae413b6e5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Entities.data.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 728df0e3465c1a148b83053a3f31d489
3 | timeCreated: 1573836981
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a1693d73a4f6e34d955789129c71e11
3 | DefaultImporter:
4 | userData:
5 | assetBundleName:
6 | assetBundleVariant:
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Mathematics.data.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4866e740a22eb1e49b1603b051e4d92c
3 | timeCreated: 1573836980
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 62090dc7038a8e04ba49f53978c18bee
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63615a2d4c0d43b4ca56639e3844a129
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Config.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91030d36e46781f41825422c39771592
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: -1671962818, guid: afbf832bc46149f5a291e87cab63e46d, type: 3}
13 | m_Name: AutomationConfig
14 | m_EditorClassIdentifier:
15 | OnPlayMode: 0
16 | OnPlayModeIfWarnings: 0
17 | OnPlayModeIfErrors: 3
18 | OnPlayModeAlwaysCompleteValidationFully: 0
19 | OnPlayModeFlashScreen: 0
20 | OnPlayModeSetup:
21 | Profile: 0
22 | ProfileAsset: {fileID: 0}
23 | OnBuild: 0
24 | OnBuildIfWarnings: 0
25 | OnBuildIfErrors: 3
26 | OnBuildAlwaysCompleteValidationFully: 0
27 | OnBuildFlashScreen: 0
28 | OnBuildSetup:
29 | Profile: 0
30 | ProfileAsset: {fileID: 0}
31 | OnProjectStartup: 0
32 | OnProjectStartupIfWarnings: 0
33 | OnProjectStartupIfErrors: 1
34 | OnProjectStartupAlwaysCompleteValidationFully: 0
35 | OnProjectStartupFlashScreen: 0
36 | OnProjectStartupSetup:
37 | Profile: 0
38 | ProfileAsset: {fileID: 0}
39 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/AutomationConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0ffdb16866d4aed438e303961d9dbed7
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/GlobalValidationConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ea45948435e385242a16ea3b0fb73dc0
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 1434321088, guid: afbf832bc46149f5a291e87cab63e46d, type: 3}
13 | m_Name: RuleConfig
14 | m_EditorClassIdentifier:
15 | projectRules: []
16 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Config/RuleConfig.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73c9e8b677c3f0444aa202ae1fa6f1d2
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7b0a1a6d02419884684e0a2cc5111804
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 217257422, guid: afbf832bc46149f5a291e87cab63e46d, type: 3}
13 | m_Name: Main Profile
14 | m_EditorClassIdentifier:
15 | Include:
16 | - Enabled: 1
17 | Type: 2
18 | Asset:
19 | Path:
20 | Filter:
21 | Object: {fileID: 0}
22 | Scene:
23 | Type: 2
24 | Value:
25 | IncludeAssetDependencies: 1
26 | AssetBundle:
27 | AddressableGroup:
28 | - Enabled: 1
29 | Type: 2
30 | Asset:
31 | Path:
32 | Filter:
33 | Object: {fileID: 0}
34 | Scene:
35 | Type: 1
36 | Value:
37 | IncludeAssetDependencies: 1
38 | AssetBundle:
39 | AddressableGroup:
40 | - Enabled: 1
41 | Type: 2
42 | Asset:
43 | Path:
44 | Filter:
45 | Object: {fileID: 0}
46 | Scene:
47 | Type: 0
48 | Value: Assets
49 | IncludeAssetDependencies: 0
50 | AssetBundle:
51 | AddressableGroup:
52 | - Enabled: 1
53 | Type: 0
54 | Asset:
55 | Path: Assets
56 | Filter:
57 | Object: {fileID: 0}
58 | Scene:
59 | Type: 0
60 | Value:
61 | IncludeAssetDependencies: 0
62 | AssetBundle:
63 | AddressableGroup:
64 | Exclude: []
65 | icon: 391
66 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Editor/Profiles/Main Profile.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f311096218f636746be15d7c26b9d897
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/EnsureCorrectOdinVersion.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9454f64e8640a944ca8605d5b465d784
3 | timeCreated: 1514513487
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/Plugins/Sirenix/Odin Validator/Readme.txt:
--------------------------------------------------------------------------------
1 | -----------------------------------------------------------------------------------------
2 |
3 | Thank you for using Odin Validator.
4 |
5 | If there is anything we can help you with, or if you have any feedback, please don't hesitate to reach out!
6 |
7 | -----------------------------------------------------------------------------------------
8 |
9 | Getting Started: https://odininspector.com/tutorials/odin-project-validator/getting-started-with-odin-project-validator
10 | Support: https://odininspector.com/support
11 | Discord: https://discord.gg/AgDmStu
12 |
13 | -----------------------------------------------------------------------------------------
14 |
15 | Odin Validator is published and developed by Sirenix.
16 |
17 | Sirenix: Https://sirenix.net
18 |
19 | -----------------------------------------------------------------------------------------
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Odin Validator/Readme.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 151ca3ac64d79f9478810af1f27c4c57
3 | timeCreated: 1556895130
4 | licenseType: Free
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Readme.txt:
--------------------------------------------------------------------------------
1 | ------------------------------------ Getting Started ------------------------------------
2 |
3 | Open up the Getting Started guide from "Tools > Odin Inspector > Getting Started."
4 |
5 |
6 | ------------------------------------- Helpful Links -------------------------------------
7 |
8 | Tutorials: https://odininspector.com/tutorials
9 | API Documentaion: https://odininspector.com/documentation
10 | Roadmap: https://odininspector.com/roadmap
11 | Release Notes: https://odininspector.com/patch-notes
12 | Issue Tracker: https://bitbucket.org/sirenix/odin-inspector
13 |
14 |
15 | --------------------------------- Community and Support ---------------------------------
16 |
17 | If you have any issues, suggestions or want advice, then you're more than welcome
18 | to join us on Discord, or reach out to us by any other means.
19 |
20 | Support: https://odininspector.com/support
21 | Community Addons: https://odininspector.com/community-tools
22 | Discord: https://discord.gg/AgDmStu
23 |
24 |
25 | -------------------------------------- Thank you! ---------------------------------------
26 |
27 | We really hope you like using Odin. Be sure to leave a review on the Asset Store,
28 | that helps us out a lot!
29 |
30 | Leave a review: https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041
31 |
32 |
33 | Odin Inspector is published and developed by Sirenix.
34 |
35 | Sirenix: Https://sirenix.net
--------------------------------------------------------------------------------
/Assets/Plugins/Sirenix/Readme.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e957a9e8b4f4bce4b8a34e504a8c39d7
3 | timeCreated: 1533815770
4 | licenseType: Free
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6ea315d0fd7389c41b19996891e99ae3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/1. Start.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fc0d4010bbf28b4594072e72b8655ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Scenes/2. ExternalNode.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be8d3a792e90c8844926ef9babcdd8ee
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Images/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Images/1.png
--------------------------------------------------------------------------------
/Images/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Images/2.png
--------------------------------------------------------------------------------
/Images/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Images/3.png
--------------------------------------------------------------------------------
/Images/LowerPriorityAbort.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Images/LowerPriorityAbort.gif
--------------------------------------------------------------------------------
/Images/StickNoteAndGroup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/Images/StickNoteAndGroup.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Saroce
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": "1.17.7",
4 | "com.unity.feature.development": "1.0.1",
5 | "com.unity.ide.rider": "3.0.16",
6 | "com.unity.ide.visualstudio": "2.0.16",
7 | "com.unity.ide.vscode": "1.2.5",
8 | "com.unity.test-framework": "1.1.31",
9 | "com.unity.textmeshpro": "3.0.6",
10 | "com.unity.timeline": "1.6.4",
11 | "com.unity.ugui": "1.0.0",
12 | "com.unity.visualscripting": "1.7.8",
13 | "com.unity.modules.ai": "1.0.0",
14 | "com.unity.modules.androidjni": "1.0.0",
15 | "com.unity.modules.animation": "1.0.0",
16 | "com.unity.modules.assetbundle": "1.0.0",
17 | "com.unity.modules.audio": "1.0.0",
18 | "com.unity.modules.cloth": "1.0.0",
19 | "com.unity.modules.director": "1.0.0",
20 | "com.unity.modules.imageconversion": "1.0.0",
21 | "com.unity.modules.imgui": "1.0.0",
22 | "com.unity.modules.jsonserialize": "1.0.0",
23 | "com.unity.modules.particlesystem": "1.0.0",
24 | "com.unity.modules.physics": "1.0.0",
25 | "com.unity.modules.physics2d": "1.0.0",
26 | "com.unity.modules.screencapture": "1.0.0",
27 | "com.unity.modules.terrain": "1.0.0",
28 | "com.unity.modules.terrainphysics": "1.0.0",
29 | "com.unity.modules.tilemap": "1.0.0",
30 | "com.unity.modules.ui": "1.0.0",
31 | "com.unity.modules.uielements": "1.0.0",
32 | "com.unity.modules.umbra": "1.0.0",
33 | "com.unity.modules.unityanalytics": "1.0.0",
34 | "com.unity.modules.unitywebrequest": "1.0.0",
35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
36 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
37 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
38 | "com.unity.modules.unitywebrequestwww": "1.0.0",
39 | "com.unity.modules.vehicles": "1.0.0",
40 | "com.unity.modules.video": "1.0.0",
41 | "com.unity.modules.vr": "1.0.0",
42 | "com.unity.modules.wind": "1.0.0",
43 | "com.unity.modules.xr": "1.0.0"
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 1024
20 |
--------------------------------------------------------------------------------
/ProjectSettings/AutoStreamingSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1200 &1
4 | AutoStreamingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | mSearchMode: 15
8 | mCustomSearchFile:
9 | mTextureSearchString:
10 | mMeshSearchString:
11 | mTextures: []
12 | mAudios: []
13 | mMeshes: []
14 | mScenes: []
15 | mConfigCCD:
16 | useCCD: 0
17 | cosKey:
18 | projectGuid:
19 | bucketUuid:
20 | bucketName:
21 | badgeName:
22 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 0
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 0
30 | m_SerializeInlineMappingsOnOneLine: 1
31 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 13
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | m_PreloadedShaders: []
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
40 | type: 0}
41 | m_CustomRenderPipeline: {fileID: 0}
42 | m_TransparencySortMode: 0
43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
44 | m_DefaultRenderingPath: 1
45 | m_DefaultMobileRenderingPath: 1
46 | m_TierSettings: []
47 | m_LightmapStripping: 0
48 | m_FogStripping: 0
49 | m_InstancingStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_LightsUseLinearIntensity: 0
61 | m_LightsUseColorTemperature: 0
62 | m_LogWhenShaderIsCompiled: 0
63 | m_AllowEnlightenSupportForUpgradedProject: 0
64 |
--------------------------------------------------------------------------------
/ProjectSettings/MemorySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!387306366 &1
4 | MemorySettings:
5 | m_ObjectHideFlags: 0
6 | m_EditorMemorySettings:
7 | m_MainAllocatorBlockSize: -1
8 | m_ThreadAllocatorBlockSize: -1
9 | m_MainGfxBlockSize: -1
10 | m_ThreadGfxBlockSize: -1
11 | m_CacheBlockSize: -1
12 | m_TypetreeBlockSize: -1
13 | m_ProfilerBlockSize: -1
14 | m_ProfilerEditorBlockSize: -1
15 | m_BucketAllocatorGranularity: -1
16 | m_BucketAllocatorBucketsCount: -1
17 | m_BucketAllocatorBlockSize: -1
18 | m_BucketAllocatorBlockCount: -1
19 | m_ProfilerBucketAllocatorGranularity: -1
20 | m_ProfilerBucketAllocatorBucketsCount: -1
21 | m_ProfilerBucketAllocatorBlockSize: -1
22 | m_ProfilerBucketAllocatorBlockCount: -1
23 | m_TempAllocatorSizeMain: -1
24 | m_JobTempAllocatorBlockSize: -1
25 | m_BackgroundJobTempAllocatorBlockSize: -1
26 | m_JobTempAllocatorReducedBlockSize: -1
27 | m_TempAllocatorSizeGIBakingWorker: -1
28 | m_TempAllocatorSizeNavMeshWorker: -1
29 | m_TempAllocatorSizeAudioWorker: -1
30 | m_TempAllocatorSizeCloudWorker: -1
31 | m_TempAllocatorSizeGfx: -1
32 | m_TempAllocatorSizeJobWorker: -1
33 | m_TempAllocatorSizeBackgroundWorker: -1
34 | m_TempAllocatorSizePreloadManager: -1
35 | m_PlatformMemorySettings: {}
36 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreReleasePackages: 0
16 | m_EnablePackageDependencies: 0
17 | m_AdvancedSettingsExpanded: 1
18 | m_ScopedRegistriesSettingsExpanded: 1
19 | m_SeeAllPackageVersions: 0
20 | oneTimeWarningShown: 0
21 | m_Registries:
22 | - m_Id: main
23 | m_Name:
24 | m_Url: https://packages.unity.cn
25 | m_Scopes: []
26 | m_IsDefault: 1
27 | m_Capabilities: 7
28 | m_ConfigSource: 0
29 | m_UserSelectedRegistryName:
30 | m_UserAddingNewScopedRegistry: 0
31 | m_RegistryInfoDraft:
32 | m_Modified: 0
33 | m_ErrorMessage:
34 | m_UserModificationsInstanceId: -834
35 | m_OriginalInstanceId: -836
36 | m_LoadAssets: 0
37 |
--------------------------------------------------------------------------------
/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "m_Name": "Settings",
3 | "m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json",
4 | "m_Dictionary": {
5 | "m_DictionaryValues": []
6 | }
7 | }
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2021.3.16f1c1
2 | m_EditorVersionWithRevision: 2021.3.16f1c1 (56dbfdd6697f)
3 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/TimelineSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | assetDefaultFramerate: 60
16 | m_DefaultFrameRate: 60
17 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_DashboardUrl: https://dashboard.unity3d.com
13 | m_CNEventUrl: https://cdp.cloud.unity.cn/v1/events
14 | m_CNConfigUrl: https://cdp.cloud.unity.cn/config
15 | m_TestInitMode: 0
16 | CrashReportingSettings:
17 | m_EventUrl: https://perf-events.cloud.unity.cn
18 | m_Enabled: 0
19 | m_LogBufferSize: 10
20 | m_CaptureEditorExceptions: 1
21 | UnityPurchasingSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | UnityAnalyticsSettings:
25 | m_Enabled: 1
26 | m_TestMode: 0
27 | m_InitializeOnStartup: 1
28 | m_PackageRequiringCoreStatsPresent: 0
29 | UnityAdsSettings:
30 | m_Enabled: 0
31 | m_InitializeOnStartup: 1
32 | m_TestMode: 0
33 | m_IosGameId:
34 | m_AndroidGameId:
35 | m_GameIds: {}
36 | m_GameId:
37 | PerformanceReportingSettings:
38 | m_Enabled: 0
39 |
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 |
--------------------------------------------------------------------------------
/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/ProjectSettings/boot.config:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Saroce/BehaviorTreeEditor/aa914178e9e8637ce7955bc9784331f6f1cf4a0f/ProjectSettings/boot.config
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BehaviorTreeEditor
2 |
3 | #### 目录结构
4 |
5 | - BTCore
6 | - Data:BT数据导出目录,主要为json格式。
7 | - Editor:编辑器部分,引用到Odin插件做编辑处理。
8 | - Runtime:注意Runtime部分需要支持脱离Unity环境运行,因此不能引用到任何Unity相关API和特性,只用到了一个第三方json序列化库**Newtonsoft.Json**方便序列化处理数据,你也可以替换为其他序列化保存方式。
9 | - Runtime.Unity:需要引用Unity部分的代码请放入这个目录,目前暂未实现主体逻辑,待扩展。
10 |
11 | #### 使用说明
12 |
13 | 若只在Unity里面用,正常使用即可,挂载上BehaviorTree组件,或者其他反序列化BT数据后做Tick操作即可。当需要支持BT.Runtime部分脱离Unity环境运行,用于服务端或者帧同步框架上时,可以直接拷贝源码,或者独立生成BTRuntime.dll到外部工程,引用上Newtonsoft.Json即可。节点的Inspector面板和黑板面板都是用Odin插件实现编辑效果,支持节点变量绑定黑板数据,实现逻辑可以看BTCore.Editor部分代码。
14 |
15 | #### 功能实现
16 |
17 | - [x] 行为树节点数据编辑,黑板功能实现
18 | - [x] 支持节点赋值粘贴、撤销回退,运行时预览状态
19 | - [x] 右键实现节点分类搜索框、选中自动生成对应节点
20 | - [x] 实现组合节点3种中断机制,Self、LowerPriority、Both
21 | - [x] 增加对单个节点的注释,新增节点Group、StickyNotes(版本需2020往上)
22 |
23 | #### 效果图
24 |
25 | 
26 | Group、StickNote在节点搜索框分类的Others里面。注意按住Shift建后,再点击Group里面的节点才能拖拽出组!
27 |
28 | #### 节点中断机制
29 |
30 | 
31 | 增加了组合节点的中断功能,如图所示Sequence设置了LowPriority,当按钮按下时,能够打断右边的持续性Action节点运行,整体思路可参考BehaviorDesigner
32 |
33 | #### 外部工程使用说明
34 |
35 | 
36 | 打开Scenes/2. ExternalNode.unity场景,里面有提供一个简单的示例Demo,相关脚本在Examples/ExternalNode目录下。提供了Condition,Action外部节点类型扩展,一般来说外部工程的代码不放到Unity里面,无法识别具体的类型,Unity侧提供了ExternalCondition,ExternalAction两个节点做编辑占位处理。在每个节点Inspector上有对应的映射字段TypeName便于创建对应外部类型,Properties字段方便向外部传递数据。运行时会将占位节点替换为具体映射类型,然后重建树节点之间的连接关系。
37 |
38 | #### 已知问题
39 |
40 | - ~~装饰节点在已有子节点的情况下,直接拖拽新的子节点可能会导致BT数据部分对不上~~
41 | - 注意目前Group、StickNote节点不支持撤销、回退!!!
42 |
43 | #### 参考
44 |
45 | - https://github.com/thekiwicoder0/UnityBehaviourTreeEditor
46 |
--------------------------------------------------------------------------------
/UIElementsSchema/UIElements.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/UIElementsSchema/UnityEditor.Search.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------