├── Editor ├── Resources │ ├── Grid.png │ ├── Log.png │ ├── Play.png │ ├── Arrow.png │ ├── Cross.png │ ├── Service.png │ ├── Shield.png │ ├── Shuffle.png │ ├── Timer.png │ ├── Checkmark.png │ ├── Condition.png │ ├── Gradient.png │ ├── Hourglass.png │ ├── Parallel.png │ ├── Priority.png │ ├── Question.png │ ├── Reactive.png │ ├── TreeIcon.png │ ├── DarkTexture.png │ ├── Exclamation.png │ ├── Interruptor.png │ ├── PlainTexture.png │ ├── RepeatArrow.png │ ├── SmallCross.png │ ├── Interruptable.png │ ├── SmallCheckmark.png │ ├── ParallelSelector.png │ ├── ShuffleQuestion.png │ ├── DefaultBonsaiPreferences.asset.meta │ ├── DefaultBonsaiPreferences.asset │ ├── Arrow.png.meta │ ├── Cross.png.meta │ ├── Grid.png.meta │ ├── Log.png.meta │ ├── Play.png.meta │ ├── Checkmark.png.meta │ ├── Condition.png.meta │ ├── Hourglass.png.meta │ ├── Parallel.png.meta │ ├── Priority.png.meta │ ├── Question.png.meta │ ├── Service.png.meta │ ├── Shield.png.meta │ ├── DarkTexture.png.meta │ ├── Exclamation.png.meta │ ├── Gradient.png.meta │ ├── Interruptable.png.meta │ ├── Interruptor.png.meta │ ├── PlainTexture.png.meta │ ├── Reactive.png.meta │ ├── RepeatArrow.png.meta │ ├── Shuffle.png.meta │ ├── SmallCross.png.meta │ ├── TreeIcon.png.meta │ ├── ParallelSelector.png.meta │ ├── ShuffleQuestion.png.meta │ ├── SmallCheckmark.png.meta │ └── Timer.png.meta ├── Actions │ ├── IUndoableAction.cs │ ├── EditorAreaSelect.cs.meta │ ├── EditorMultiDrag.cs.meta │ ├── EditorSelection.cs.meta │ ├── EditorSingleDrag.cs.meta │ ├── IUndoableAction.cs.meta │ ├── EditorChangeNodeType.cs.meta │ ├── EditorNodeConnecting.cs.meta │ ├── EditorNodeCreation.cs.meta │ ├── EditorNodeLinking.cs.meta │ ├── IReadOnlySelection.cs.meta │ ├── IReadOnlySelection.cs │ ├── EditorChangeNodeType.cs │ ├── EditorNodeConnecting.cs │ ├── EditorAreaSelect.cs │ ├── EditorNodeCreation.cs │ ├── EditorMultiDrag.cs │ └── EditorSingleDrag.cs ├── Actions.meta ├── BonsaiEditorAssembly.asmdef.meta ├── Inspectors.meta ├── Resources.meta ├── Drawer.cs.meta ├── Formatter.cs.meta ├── BonsaiInput.cs.meta ├── BonsaiSaver.cs.meta ├── BonsaiViewer.cs.meta ├── BonsaiInputEvent.cs.meta ├── BonsaiPreferences.cs.meta ├── CanvasTransform.cs.meta ├── Inspectors │ ├── BehaviourNodeInspector.cs.meta │ ├── GuardInspector.cs.meta │ ├── BonsaiTreeInspector.cs.meta │ ├── InterruptorInspector.cs.meta │ ├── IsValueOfTypeInspector.cs.meta │ ├── InterruptorInspector.cs │ ├── GuardInspector.cs │ └── IsValueOfTypeInspector.cs ├── BonsaiCanvas.cs.meta ├── BonsaiEditor.cs.meta ├── BonsaiNode.cs.meta ├── BonsaiWindow.cs.meta ├── ScaleUtility.cs.meta ├── BonsaiEditorAssembly.asmdef ├── BonsaiInputEvent.cs ├── ScaleUtility.cs └── CanvasTransform.cs ├── Tests.meta ├── BonsaiAssembly.asmdef.meta ├── Standard ├── Services.meta ├── BonsaiStandardAssembly.asmdef.meta ├── Tasks.meta ├── Composites.meta ├── Decorators.meta ├── ConditionalTasks.meta ├── ConditionalAborts.meta ├── Tasks │ ├── Idle.cs.meta │ ├── Print.cs.meta │ ├── Wait.cs.meta │ ├── Include.cs.meta │ ├── Idle.cs │ ├── Wait.cs │ ├── Include.cs │ └── Print.cs ├── Decorators │ ├── Guard.cs.meta │ ├── Failure.cs.meta │ ├── Interruptor.cs.meta │ ├── Inverter.cs.meta │ ├── Repeater.cs.meta │ ├── Success.cs.meta │ ├── Interruptable.cs.meta │ ├── UntilFailure.cs.meta │ ├── UntilSuccess.cs.meta │ ├── Inverter.cs │ ├── Failure.cs │ ├── Success.cs │ ├── UntilFailure.cs │ ├── UntilSuccess.cs │ ├── Interruptable.cs │ ├── Interruptor.cs │ └── Repeater.cs ├── Composites │ ├── Parallel.cs.meta │ ├── Selector.cs.meta │ ├── Sequence.cs.meta │ ├── ParallelSelector.cs.meta │ ├── RandomSelector.cs.meta │ ├── RandomSequence.cs.meta │ ├── UtilitySelector.cs.meta │ ├── ParallelSelector.cs │ ├── Parallel.cs │ ├── Selector.cs │ ├── Sequence.cs │ ├── RandomSequence.cs │ └── RandomSelector.cs ├── ConditionalAborts │ ├── Cooldown.cs.meta │ ├── TimeLimit.cs.meta │ ├── CompareEntries.cs.meta │ ├── IsValueOfType.cs.meta │ ├── IsValueSet.cs.meta │ ├── TimeLimit.cs │ ├── IsValueSet.cs │ ├── Cooldown.cs │ ├── CompareEntries.cs │ └── IsValueOfType.cs ├── ConditionalTasks │ ├── Chance.cs.meta │ └── Chance.cs └── BonsaiStandardAssembly.asmdef ├── Tests ├── BonsaiTestsAssembly.asmdef.meta ├── Helper.cs.meta ├── CoreTreeTests.cs.meta ├── CompositeTestSuite.cs.meta ├── BonsaiTestsAssembly.asmdef ├── CoreTreeTests.cs └── Helper.cs ├── Core.meta ├── Editor.meta ├── Standard.meta ├── Utility.meta ├── Core ├── Service.cs.meta ├── TreeQuery.cs.meta ├── IIterableNode.cs.meta ├── TreeTraversal.cs.meta ├── ParallelComposite.cs.meta ├── ShowAtRuntimeAttribute.cs.meta ├── Task.cs.meta ├── Blackboard.cs.meta ├── Composite.cs.meta ├── Decorator.cs.meta ├── BehaviourNode.cs.meta ├── BehaviourTree.cs.meta ├── ConditionalAbort.cs.meta ├── ConditionalTask.cs.meta ├── BehaviourIterator.cs.meta ├── BonsaiNodeAttribute.cs.meta ├── BonsaiTreeComponent.cs.meta ├── BonsaiNodeAttribute.cs ├── ShowAtRuntimeAttribute.cs ├── ConditionalTask.cs ├── Task.cs ├── IIterableNode.cs ├── BonsaiTreeComponent.cs ├── Service.cs ├── Decorator.cs ├── TreeQuery.cs └── Composite.cs ├── Utility ├── Result.cs.meta ├── Timer.cs.meta ├── ReactiveValue.cs.meta ├── UpdateList.cs.meta ├── FixedSizeStack.cs.meta ├── MathExtensions.cs.meta ├── TypeExtensions.cs.meta ├── ReactiveValue.cs ├── MathExtensions.cs ├── FixedSizeStack.cs ├── Result.cs ├── TypeExtensions.cs ├── UpdateList.cs └── Timer.cs ├── BonsaiAssembly.asmdef ├── LICENSE └── .gitignore /Editor/Resources/Grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Grid.png -------------------------------------------------------------------------------- /Editor/Resources/Log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Log.png -------------------------------------------------------------------------------- /Editor/Resources/Play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Play.png -------------------------------------------------------------------------------- /Editor/Resources/Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Arrow.png -------------------------------------------------------------------------------- /Editor/Resources/Cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Cross.png -------------------------------------------------------------------------------- /Editor/Resources/Service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Service.png -------------------------------------------------------------------------------- /Editor/Resources/Shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Shield.png -------------------------------------------------------------------------------- /Editor/Resources/Shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Shuffle.png -------------------------------------------------------------------------------- /Editor/Resources/Timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Timer.png -------------------------------------------------------------------------------- /Editor/Resources/Checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Checkmark.png -------------------------------------------------------------------------------- /Editor/Resources/Condition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Condition.png -------------------------------------------------------------------------------- /Editor/Resources/Gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Gradient.png -------------------------------------------------------------------------------- /Editor/Resources/Hourglass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Hourglass.png -------------------------------------------------------------------------------- /Editor/Resources/Parallel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Parallel.png -------------------------------------------------------------------------------- /Editor/Resources/Priority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Priority.png -------------------------------------------------------------------------------- /Editor/Resources/Question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Question.png -------------------------------------------------------------------------------- /Editor/Resources/Reactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Reactive.png -------------------------------------------------------------------------------- /Editor/Resources/TreeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/TreeIcon.png -------------------------------------------------------------------------------- /Editor/Resources/DarkTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/DarkTexture.png -------------------------------------------------------------------------------- /Editor/Resources/Exclamation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Exclamation.png -------------------------------------------------------------------------------- /Editor/Resources/Interruptor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Interruptor.png -------------------------------------------------------------------------------- /Editor/Resources/PlainTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/PlainTexture.png -------------------------------------------------------------------------------- /Editor/Resources/RepeatArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/RepeatArrow.png -------------------------------------------------------------------------------- /Editor/Resources/SmallCross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/SmallCross.png -------------------------------------------------------------------------------- /Editor/Resources/Interruptable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/Interruptable.png -------------------------------------------------------------------------------- /Editor/Resources/SmallCheckmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/SmallCheckmark.png -------------------------------------------------------------------------------- /Editor/Resources/ParallelSelector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/ParallelSelector.png -------------------------------------------------------------------------------- /Editor/Resources/ShuffleQuestion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luis-l/BonsaiBehaviourTree/HEAD/Editor/Resources/ShuffleQuestion.png -------------------------------------------------------------------------------- /Editor/Actions/IUndoableAction.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Bonsai.Designer 3 | { 4 | public interface IUndoableAction 5 | { 6 | void Undo(); 7 | void Redo(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cefe23f8abb6cb46add4375dc4ca013 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /BonsaiAssembly.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e663252ae8cdac9448492a619a23dbb5 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Actions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1796853a840c4844da87c33274109a0b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Standard/Services.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e641b967f38816c45a56581da35b099c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/BonsaiEditorAssembly.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26b9a90400f071b48b1eeb2bce59af07 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Tests/BonsaiTestsAssembly.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3471b18990ab77f4f9c5abec6537347d 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Standard/BonsaiStandardAssembly.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f12b1473fbbbd804b895981477fdf4e9 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2758aca9ba78d3b47a10d3107d9af7a3 3 | folderAsset: yes 4 | timeCreated: 1491187831 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a03701c2aad8ca4d90ff3547cd0cf86 3 | folderAsset: yes 4 | timeCreated: 1491212928 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Standard.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2d346661a24fb34f8364f2d6d2d6cf1 3 | folderAsset: yes 4 | timeCreated: 1491197464 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e2f21a406d9f784fab562d4f29d5cc3 3 | folderAsset: yes 4 | timeCreated: 1490389666 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Standard/Tasks.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbca61c7dbbbe534d9e1e0e9f537ccb5 3 | folderAsset: yes 4 | timeCreated: 1491208288 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Inspectors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3642438e73c972347b1f82e06bfe0eea 3 | folderAsset: yes 4 | timeCreated: 1495247987 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46559490b0b0bac42807d08e41ef56ec 3 | folderAsset: yes 4 | timeCreated: 1491601536 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Standard/Composites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbe78d3736a2dae468f729d1c4ce8526 3 | folderAsset: yes 4 | timeCreated: 1491197500 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Standard/Decorators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b77f7f36b3124040a79eb1ac488d728 3 | folderAsset: yes 4 | timeCreated: 1491208282 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Resources/DefaultBonsaiPreferences.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa39d11e6843fab419d54c40619bca9b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Standard/ConditionalTasks.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4628ff283bcfca0468515d8a2f1972bc 3 | folderAsset: yes 4 | timeCreated: 1495242792 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff97073e535538240b43f523f6f45411 3 | folderAsset: yes 4 | timeCreated: 1496529318 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Core/Service.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad88de62e8d010a43860e8f8c0e74578 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/TreeQuery.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2857c469a9ea4174e98b2f9d55269b5f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Drawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc12c86abb371774b93124571e9486db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Formatter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b672999f53e029642a487b7fb2bb09cf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Helper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed6d5ac23c0066048a929442a3455ce5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/Result.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddc8fcefb17cfc64ba7524f76dcf1d8c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/Timer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 919d187ef9de4744789b2c5e202cf395 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/IIterableNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 692b6ab823ddee243a9f77a2a0dda965 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/TreeTraversal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03f0fba3fbb443a4d9f9a717d79f89b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/BonsaiInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0db27d0e69c8a4544968bc05a2226d96 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/BonsaiSaver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d01f1ef9f18c5be43afce08d0b280da1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/BonsaiViewer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2fe430cefdb3244e9e2f173a3d38712 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/CoreTreeTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90084615642c91c479b7d6eb599b8ca4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/ReactiveValue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4445c92048d81a94da62d312e5a5ac32 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/UpdateList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bed49a749deed2145a31989b05078c3d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/ParallelComposite.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f52980e384a07cb4ab2dc8ef13ad5f77 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/BonsaiInputEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a01e7fb7bcc77d244866304fc1a9058f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/BonsaiPreferences.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 524b8d4bdc9aaf143b5ae1195caba6d6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/CanvasTransform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a610a51091220f44d8b5d84c29beddca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/CompositeTestSuite.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acec03680523916418faa3d73ad1dbc9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/FixedSizeStack.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd6eb2ad0af07f64d9dc05b9acab30b1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/MathExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68b7c31ebced6724db815153de7995cb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Utility/TypeExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7074b428c519c049b53e1800b6a27be 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/ShowAtRuntimeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c6c051b96377df4b96d5bbb41b208b1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorAreaSelect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e73b89f16bc0524597056706ea086ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorMultiDrag.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1662386df69786748b30eb2538267e44 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorSelection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cfff54f28237864ba1914d184aac8a2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorSingleDrag.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0f05dbb65328754d82a4e4928354fd9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/IUndoableAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8de02f549a9e67f4fbb2974a9548ae18 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/Task.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb9c18ec610380045b667e218fabe03f 3 | timeCreated: 1494629057 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Actions/EditorChangeNodeType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 888acf7dff34b7544a64df0312a40253 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorNodeConnecting.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f488534b85b5c254fae7d26ab233d916 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorNodeCreation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3d25f6214c5cda418eaae78663b952a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/EditorNodeLinking.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5563c3ac68668604eb0aed6857136780 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Actions/IReadOnlySelection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5871c15e96f179f47b624ca4d826fca7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/Blackboard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09a07908f6a5fd44e906d041ac135bfc 3 | timeCreated: 1493668534 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/Composite.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2d92df4d030f704f8686f308af4f022 3 | timeCreated: 1494629046 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/Decorator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20fd494abb680394bba9adb15502cd5e 3 | timeCreated: 1494629053 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Inspectors/BehaviourNodeInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07c39a7dd89aa6b4092138c8d2e7f8d4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Core/BehaviourNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2666d74530d23a849a53ae3324c5d6d1 3 | timeCreated: 1494629037 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/BehaviourTree.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e327cacc628d65b4faa51b0a82bf63c2 3 | timeCreated: 1490678918 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/ConditionalAbort.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f707c9c2c3d10504fb59bfa137e9a36e 3 | timeCreated: 1494632172 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/ConditionalTask.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3009b7f4e17986c49a7c1e3c52392a29 3 | timeCreated: 1495242484 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/BonsaiCanvas.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3ad5491ce18b4244840bd845a88d931 3 | timeCreated: 1491597645 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/BonsaiEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bf3305aff12a654b845542b54f76bb4 3 | timeCreated: 1491595845 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/BonsaiNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d6ab929a8f428f478ef028f1080d005 3 | timeCreated: 1491597857 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/BonsaiWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b2adc5bd130aeb439ae875a4b7c6d2f 3 | timeCreated: 1491213672 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/ScaleUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1531560365f0bfb45881cc297952a854 3 | timeCreated: 1491887635 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Tasks/Idle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3afafcb403fbb9147b2d5023e92d75b0 3 | timeCreated: 1495420797 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Tasks/Print.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 822914705e95c4f40b065b030dc4487d 3 | timeCreated: 1491432500 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Tasks/Wait.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6290070e5b743314084c4bf4d7201fe5 3 | timeCreated: 1493275138 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/BehaviourIterator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bfc96b269cc9304c8f2132bb29dd1c9 3 | timeCreated: 1491185820 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/BonsaiNodeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa89e3069b1e20e4b92efb08a6c45aee 3 | timeCreated: 1491269342 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Core/BonsaiTreeComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6de49ee75718ef94398bd86a6a4f23fc 3 | timeCreated: 1493246724 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Guard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7b81050d4caace419c313dbf0d25f15 3 | timeCreated: 1495582713 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Tasks/Include.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ba134dfc50752547a552564711bee84 3 | timeCreated: 1496355674 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/Parallel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ffd532fcd28735448b5f84b50925241 3 | timeCreated: 1491197489 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/Selector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b4d95aae8c1c7b478fe06adf233ef0c 3 | timeCreated: 1491197482 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/Sequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f98e42124d794d24baddf03f67db4d0b 3 | timeCreated: 1491197472 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Failure.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 903c1238508f3fd4d8fe428e1f0430e5 3 | timeCreated: 1496263992 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Interruptor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23dc799858adc6f4cb56e9baf9090dc8 3 | timeCreated: 1495582676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Inverter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00b18d73c6561f642899ae3fb7905122 3 | timeCreated: 1495582733 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Repeater.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b5e4c7bb706ee14eae9c07a7644a37a 3 | timeCreated: 1491208364 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Success.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28e45fb0cab126d4780d7513a3a3a31b 3 | timeCreated: 1496263978 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Inspectors/GuardInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 503794f83420fec4fbcf01bdd86f9642 3 | timeCreated: 1495662527 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/ParallelSelector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9ed9224681fd2e4b81a6a1f1f647031 3 | timeCreated: 1495685120 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/RandomSelector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97c8b5a76b97b5d41abfdb7543ef55ba 3 | timeCreated: 1496198808 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/RandomSequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d920075c22928cd4c85854a38593d7c0 3 | timeCreated: 1496198800 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Composites/UtilitySelector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3125ae739752e504a9c041242db34aa8 3 | timeCreated: 1496267744 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/Cooldown.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6e76179991b05745a52a828bd863822 3 | timeCreated: 1496682690 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/TimeLimit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7a8c635ed7b619479ce11e7c5d08b92 3 | timeCreated: 1496629984 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/ConditionalTasks/Chance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f9f88475f2b4d94b9fdbd96da5b4f1e 3 | timeCreated: 1495242830 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/Interruptable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8f69bc7bd609a045b4d326c41dfa200 3 | timeCreated: 1495582699 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/UntilFailure.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8476b8372ee87654bb16007e643395fc 3 | timeCreated: 1496264002 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/Decorators/UntilSuccess.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f06453c5f447ee488239189521c5ea9 3 | timeCreated: 1496264012 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Inspectors/BonsaiTreeInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acdedc25a03736c418ac688d309c5c07 3 | timeCreated: 1493668546 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Inspectors/InterruptorInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 143431ae2d44a394f8d4ee89acaf109b 3 | timeCreated: 1495595484 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Inspectors/IsValueOfTypeInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5bfcc856814e4f4190834acf217873a 3 | timeCreated: 1496691606 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/CompareEntries.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b873e1d94f4d443458297335ebc28434 3 | timeCreated: 1496529644 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/IsValueOfType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a151186405f2444d96df2b0a098524c 3 | timeCreated: 1496690644 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/IsValueSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c296e9ede5f05c14da92067d4e3bfcac 3 | timeCreated: 1496727943 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /BonsaiAssembly.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BonsaiAssembly", 3 | "references": [], 4 | "includePlatforms": [], 5 | "excludePlatforms": [], 6 | "allowUnsafeCode": false, 7 | "overrideReferences": false, 8 | "precompiledReferences": [], 9 | "autoReferenced": true, 10 | "defineConstraints": [], 11 | "versionDefines": [], 12 | "noEngineReferences": false 13 | } -------------------------------------------------------------------------------- /Core/BonsaiNodeAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace Bonsai 5 | { 6 | [AttributeUsage(AttributeTargets.Class)] 7 | public class BonsaiNodeAttribute : Attribute 8 | { 9 | public readonly string menuPath, texturePath; 10 | 11 | public BonsaiNodeAttribute(string menuPath, string texturePath = null) 12 | { 13 | this.menuPath = menuPath; 14 | this.texturePath = texturePath; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Standard/BonsaiStandardAssembly.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BonsaiStandardAssembly", 3 | "references": [ 4 | "GUID:e663252ae8cdac9448492a619a23dbb5" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": false, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } -------------------------------------------------------------------------------- /Standard/Tasks/Idle.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | /// 7 | /// Always returns running. 8 | /// 9 | [BonsaiNode("Tasks/", "Hourglass")] 10 | public class Idle : Core.Task 11 | { 12 | public override Status Run() 13 | { 14 | return Status.Running; 15 | } 16 | 17 | public override void Description(StringBuilder builder) 18 | { 19 | builder.Append("Run forever"); 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Standard/Decorators/Inverter.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | /// 7 | /// Negates the status of the child. 8 | /// 9 | [BonsaiNode("Decorators/", "Exclamation")] 10 | public class Inverter : Decorator 11 | { 12 | public override Status Run() 13 | { 14 | Status s = Iterator.LastChildExitStatus.GetValueOrDefault(Status.Success); 15 | return s == Status.Failure ? Status.Success : Status.Failure; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Editor/BonsaiEditorAssembly.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BonsaiEditorAssembly", 3 | "references": [ 4 | "GUID:e663252ae8cdac9448492a619a23dbb5", 5 | "GUID:f12b1473fbbbd804b895981477fdf4e9" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Core/ShowAtRuntimeAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | 5 | namespace Bonsai 6 | { 7 | /// 8 | /// Displays the field or property value in the BehaviourNode inspector when the tree runs. 9 | /// 10 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 11 | public class ShowAtRuntimeAttribute : Attribute 12 | { 13 | public readonly string label; 14 | public ShowAtRuntimeAttribute(string label = null) 15 | { 16 | this.label = label; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Standard/Decorators/Failure.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | /// 8 | /// Alaways returns failure. 9 | /// 10 | [BonsaiNode("Decorators/", "SmallCross")] 11 | public class Failure : Decorator 12 | { 13 | public override Status Run() 14 | { 15 | return Status.Failure; 16 | } 17 | 18 | public override void Description(StringBuilder builder) 19 | { 20 | builder.Append("Always fail"); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Standard/Decorators/Success.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | /// 8 | /// Always returns success. 9 | /// 10 | [BonsaiNode("Decorators/", "SmallCheckmark")] 11 | public class Success : Decorator 12 | { 13 | public override Status Run() 14 | { 15 | return Status.Success; 16 | } 17 | 18 | public override void Description(StringBuilder builder) 19 | { 20 | builder.Append("Always succeed"); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Standard/ConditionalTasks/Chance.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | using UnityEngine; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | [BonsaiNode("Conditional/", "Condition")] 8 | public class Chance : ConditionalTask 9 | { 10 | [Tooltip("The probability that the condition succeeds.")] 11 | [Range(0f, 1f)] 12 | public float chance = 0.5f; 13 | 14 | public override bool Condition() 15 | { 16 | // Return true if the probability is within the range [0, chance]; 17 | return Random.value <= chance; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Editor/BonsaiInputEvent.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace Bonsai.Designer 5 | { 6 | public class BonsaiInputEvent 7 | { 8 | public CanvasTransform transform; 9 | public Vector2 canvasMousePostion; 10 | public BonsaiNode node; 11 | public bool isInputFocused; 12 | public bool isOutputFocused; 13 | 14 | public bool IsPortFocused() 15 | { 16 | return isInputFocused || isOutputFocused; 17 | } 18 | 19 | public bool IsNodeFocused() 20 | { 21 | return node != null; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Core/ConditionalTask.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Bonsai.Core 3 | { 4 | /// 5 | /// Base class for all tasks that perform a boolean calculation. 6 | /// 7 | public abstract class ConditionalTask : Task 8 | { 9 | /// 10 | /// The condition that determines if this task succeeds (true) or fails (false). 11 | /// 12 | /// 13 | public abstract bool Condition(); 14 | 15 | public override Status Run() 16 | { 17 | bool bResult = Condition(); 18 | 19 | return bResult ? Status.Success : Status.Failure; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Standard/Composites/ParallelSelector.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Bonsai.Standard 3 | { 4 | [BonsaiNode("Composites/", "ParallelSelector")] 5 | public class ParallelSelector : Parallel 6 | { 7 | public override Status Run() 8 | { 9 | if (IsAnyChildWithStatus(Status.Success)) 10 | { 11 | return Status.Success; 12 | } 13 | 14 | if (AreAllChildrenWithStatus(Status.Failure)) 15 | { 16 | return Status.Failure; 17 | } 18 | 19 | // Process the sub-iterators. 20 | RunChildBranches(); 21 | 22 | // Parallel iterators still running. 23 | return Status.Running; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Editor/Actions/IReadOnlySelection.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | 4 | namespace Bonsai.Designer 5 | { 6 | /// 7 | /// View of the selection. 8 | /// 9 | public interface IReadOnlySelection 10 | { 11 | IReadOnlyList SelectedNodes { get; } 12 | BonsaiNode SingleSelectedNode { get; } 13 | IReadOnlyList Referenced { get; } 14 | 15 | bool IsNodeSelected(BonsaiNode node); 16 | bool IsReferenced(BonsaiNode node); 17 | 18 | int SelectedCount { get; } 19 | bool IsEmpty { get; } 20 | bool IsSingleSelection { get; } 21 | bool IsMultiSelection { get; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Standard/Decorators/UntilFailure.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | /// 7 | /// Re-traversing the child until it returns failure. 8 | /// 9 | [BonsaiNode("Decorators/", "RepeatArrow")] 10 | public class UntilFailure : Decorator 11 | { 12 | public override Status Run() 13 | { 14 | Status s = Iterator.LastChildExitStatus.GetValueOrDefault(Status.Failure); 15 | 16 | if (s == Status.Failure) 17 | { 18 | return Status.Success; 19 | } 20 | 21 | // Retraverse child. 22 | Iterator.Traverse(child); 23 | 24 | return Status.Running; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Editor/Actions/EditorChangeNodeType.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using Bonsai.Core; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Designer 7 | { 8 | public static class EditorChangeNodeType 9 | { 10 | public static void ChangeType(BonsaiNode node, Type newType) 11 | { 12 | var newBehaviour = ScriptableObject.CreateInstance(newType) as BehaviourNode; 13 | node.SetBehaviour(newBehaviour, NodeIcon(newType)); 14 | } 15 | 16 | private static Texture NodeIcon(Type behaviourType) 17 | { 18 | var prop = BonsaiEditor.GetNodeTypeProperties(behaviourType); 19 | return BonsaiPreferences.Texture(prop.texName); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Standard/Decorators/UntilSuccess.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | /// 7 | /// Keep re-traversing children until the child return success. 8 | /// 9 | [BonsaiNode("Decorators/", "RepeatArrow")] 10 | public class UntilSuccess : Decorator 11 | { 12 | public override Status Run() 13 | { 14 | Status s = Iterator.LastChildExitStatus.GetValueOrDefault(Status.Success); 15 | 16 | if (s == Status.Success) 17 | { 18 | return Status.Success; 19 | } 20 | 21 | // Retraverse child. 22 | Iterator.Traverse(child); 23 | 24 | return Status.Running; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Tests/BonsaiTestsAssembly.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BonsaiTestsAssembly", 3 | "references": [ 4 | "UnityEngine.TestRunner", 5 | "UnityEditor.TestRunner", 6 | "BonsaiAssembly", 7 | "BonsaiStandardAssembly" 8 | ], 9 | "includePlatforms": [ 10 | "Editor" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": true, 15 | "precompiledReferences": [ 16 | "nunit.framework.dll" 17 | ], 18 | "autoReferenced": false, 19 | "defineConstraints": [ 20 | "UNITY_INCLUDE_TESTS" 21 | ], 22 | "versionDefines": [], 23 | "noEngineReferences": false 24 | } -------------------------------------------------------------------------------- /Standard/Composites/Parallel.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Bonsai.Standard 3 | { 4 | /// 5 | /// Parallel node which succeeds if all its children succeed. 6 | /// 7 | [BonsaiNode("Composites/", "Parallel")] 8 | public class Parallel : Core.ParallelComposite 9 | { 10 | public override Status Run() 11 | { 12 | if (IsAnyChildWithStatus(Status.Failure)) 13 | { 14 | return Status.Failure; 15 | } 16 | 17 | if (AreAllChildrenWithStatus(Status.Success)) 18 | { 19 | return Status.Success; 20 | } 21 | 22 | RunChildBranches(); 23 | 24 | // Parallel iterators still running. 25 | return Status.Running; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Standard/Tasks/Wait.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | [BonsaiNode("Tasks/", "Timer")] 8 | public class Wait : Task 9 | { 10 | [ShowAtRuntime] 11 | [UnityEngine.SerializeField] 12 | public Utility.Timer timer = new Utility.Timer(); 13 | 14 | public override void OnEnter() 15 | { 16 | timer.Start(); 17 | } 18 | 19 | public override Status Run() 20 | { 21 | timer.Update(UnityEngine.Time.deltaTime); 22 | return timer.IsDone ? Status.Success : Status.Running; 23 | } 24 | 25 | public override void Description(StringBuilder builder) 26 | { 27 | builder.AppendFormat("Wait for {0:0.00}s", timer.interval); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Core/Task.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Bonsai.Core 3 | { 4 | /// 5 | /// The base class for all task nodes. 6 | /// 7 | public abstract class Task : BehaviourNode 8 | { 9 | // No-Ops since Tasks do not have children. These will never be invoked by the Tree. 10 | public sealed override void OnAbort(int childIndex) { } 11 | public sealed override void OnChildEnter(int childIndex) { } 12 | public sealed override void OnChildExit(int childIndex, Status childStatus) { } 13 | 14 | // Tasks do not have children. 15 | public sealed override int MaxChildCount() { return 0; } 16 | public sealed override int ChildCount() { return 0; } 17 | public sealed override BehaviourNode GetChildAt(int index) { return null; } 18 | } 19 | } -------------------------------------------------------------------------------- /Utility/ReactiveValue.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace Bonsai.Utility 5 | { 6 | /// 7 | /// Raises an event whenever the value is set. 8 | /// 9 | /// 10 | public class ReactiveValue 11 | { 12 | private T value; 13 | 14 | public event EventHandler ValueChanged; 15 | 16 | public T Value 17 | { 18 | get { return value; } 19 | set 20 | { 21 | this.value = value; 22 | OnValueChanged(); 23 | } 24 | } 25 | 26 | public ReactiveValue() 27 | { 28 | 29 | } 30 | 31 | public ReactiveValue(T value) 32 | { 33 | this.value = value; 34 | } 35 | 36 | protected virtual void OnValueChanged() 37 | { 38 | ValueChanged?.Invoke(this, value); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Editor/Inspectors/InterruptorInspector.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Standard; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Designer 7 | { 8 | [CustomEditor(typeof(Interruptor))] 9 | public class InterruptorInspector : BehaviourNodeInspector 10 | { 11 | private readonly GUIStyle linkStyle = new GUIStyle(); 12 | 13 | protected override void OnEnable() 14 | { 15 | base.OnEnable(); 16 | linkStyle.alignment = TextAnchor.MiddleCenter; 17 | linkStyle.fontStyle = FontStyle.Bold; 18 | } 19 | 20 | protected override void OnBehaviourNodeInspectorGUI() 21 | { 22 | EditorGUILayout.BeginVertical(); 23 | EditorGUILayout.Space(); 24 | EditorGUILayout.LabelField("Shift + Click to link Interruptables", linkStyle); 25 | EditorGUILayout.EndVertical(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Core/IIterableNode.cs: -------------------------------------------------------------------------------- 1 | namespace Bonsai.Core 2 | { 3 | 4 | /// 5 | /// Interface for all nodes that can iterated. 6 | /// In order to not expose a list of children, 7 | /// classes implement two simple methods for the iterator to use. 8 | /// 9 | public interface IIterableNode 10 | { 11 | /// 12 | /// Get the child at some index. 13 | /// This will allow the iterator to traverse in reverse 14 | /// the child list. 15 | /// 16 | /// 17 | /// 18 | T GetChildAt(int index); 19 | 20 | /// 21 | /// Get the child count. This tells the iterator to iterate 22 | /// from the indices [0, ChildCount() ). 23 | /// 24 | /// 25 | int ChildCount(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Standard/Composites/Selector.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | /// 7 | /// Returns success if one child returns success. 8 | /// 9 | [BonsaiNode("Composites/", "Question")] 10 | public class Selector : Composite 11 | { 12 | public override Status Run() 13 | { 14 | // If a child succeeded then the selector succeeds. 15 | if (lastChildExitStatus == Status.Success) 16 | { 17 | return Status.Success; 18 | } 19 | 20 | // Else child returned failure. 21 | 22 | // Get the next child 23 | var nextChild = CurrentChild(); 24 | 25 | // If this was the last child then the selector fails. 26 | if (nextChild == null) 27 | { 28 | return Status.Failure; 29 | } 30 | 31 | // Still need children to process. 32 | else 33 | { 34 | Iterator.Traverse(nextChild); 35 | return Status.Running; 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Standard/Composites/Sequence.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | /// 7 | /// Returns success if all children return success. 8 | /// 9 | [BonsaiNode("Composites/", "Arrow")] 10 | public class Sequence : Composite 11 | { 12 | public override Status Run() 13 | { 14 | // If a child failed then the sequence fails. 15 | if (lastChildExitStatus == Status.Failure) 16 | { 17 | return Status.Failure; 18 | } 19 | 20 | // Else child returned success. 21 | 22 | // Get the next child 23 | var nextChild = CurrentChild(); 24 | 25 | // If this was the last child then the sequence returns success. 26 | if (nextChild == null) 27 | { 28 | return Status.Success; 29 | } 30 | 31 | // Still need children to process. 32 | else 33 | { 34 | Iterator.Traverse(nextChild); 35 | return Status.Running; 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Editor/Actions/EditorNodeConnecting.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Bonsai.Designer 3 | { 4 | public static class EditorNodeConnecting 5 | { 6 | /// 7 | /// Get the parent to begin the connection. 8 | /// 9 | /// The child to orphan. 10 | /// 11 | public static BonsaiNode StartConnection(BonsaiNode child) 12 | { 13 | // Starting a connection from a child means that its parent will make a new connection. 14 | // So the child becomes orphaned. 15 | BonsaiNode parent = child.Parent; 16 | child.SetParent(null); 17 | return parent; 18 | } 19 | 20 | /// 21 | /// Creates a connection between the output and the input or node under the mouse. 22 | /// 23 | /// 24 | /// 25 | public static void FinishConnection(BonsaiCanvas canvas, BonsaiNode parent, BonsaiNode child) 26 | { 27 | canvas.AddChild(parent, child); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Standard/Decorators/Interruptable.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | [BonsaiNode("Decorators/", "Interruptable")] 7 | public class Interruptable : Decorator 8 | { 9 | private bool isRunning = false; 10 | private Status returnStatus = Status.Failure; 11 | private bool isInterrupted = false; 12 | 13 | public override void OnEnter() 14 | { 15 | isRunning = true; 16 | isInterrupted = false; 17 | base.OnEnter(); 18 | } 19 | 20 | public override Status Run() 21 | { 22 | if (isInterrupted) 23 | { 24 | return returnStatus; 25 | } 26 | 27 | return Iterator.LastChildExitStatus.GetValueOrDefault(Status.Failure); 28 | } 29 | 30 | public override void OnExit() 31 | { 32 | isRunning = false; 33 | } 34 | 35 | public void PerformInterruption(Status interruptionStatus) 36 | { 37 | if (isRunning) 38 | { 39 | isInterrupted = true; 40 | returnStatus = interruptionStatus; 41 | BehaviourTree.Interrupt(Child); 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Luis Alberto Lopez 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 | -------------------------------------------------------------------------------- /Utility/MathExtensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Bonsai.Utility 4 | { 5 | public static class MathExtensions 6 | { 7 | public static Vector2 Round(Vector2 v) 8 | { 9 | return new Vector2(Mathf.Round(v.x), Mathf.Round(v.y)); 10 | } 11 | 12 | public static Rect Round(Rect r) 13 | { 14 | return new Rect(Round(r.position), Round(r.size)); 15 | } 16 | 17 | /// 18 | /// Rounds the position to the nearest grid coordinate. 19 | /// 20 | /// 21 | /// 22 | public static Vector2 SnapPosition(Vector2 p, float snapStep) 23 | { 24 | return SnapPosition(p.x, p.y, snapStep); 25 | } 26 | 27 | /// 28 | /// Rounds the position to the nearest grid coordinate. 29 | /// 30 | /// 31 | /// 32 | /// 33 | public static Vector2 SnapPosition(float x, float y, float snapStep) 34 | { 35 | return new Vector2(Snap(x, snapStep), Snap(y, snapStep)); 36 | } 37 | 38 | public static float Snap(float x, float snapStep) 39 | { 40 | return Mathf.Round(x / snapStep) * snapStep; 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Editor/ScaleUtility.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Bonsai.Designer 4 | { 5 | public static class ScaleUtility 6 | { 7 | // Helper method to compute the scaled Rect position for BeingScale and EndScale. 8 | private static float ScaledCoord(float zoom, float dimension) 9 | { 10 | return 0.5f * ((dimension * zoom) - dimension); 11 | } 12 | 13 | public static void BeginScale(Rect rect, float scale, float topPadding) 14 | { 15 | GUI.EndClip(); 16 | GUIUtility.ScaleAroundPivot(Vector2.one / scale, rect.size * 0.5f); 17 | 18 | var position = new Vector2(-ScaledCoord(scale, rect.width), -ScaledCoord(scale, rect.height) + (topPadding * scale)); 19 | var size = new Vector2(rect.width * scale, rect.height * scale); 20 | 21 | GUI.BeginClip(new Rect(position, size)); 22 | } 23 | 24 | public static void EndScale(Rect rect, float scale, float topPadding) 25 | { 26 | GUIUtility.ScaleAroundPivot(Vector2.one * scale, rect.size * 0.5f); 27 | 28 | var offset = new Vector3( 29 | ScaledCoord(scale, rect.width), 30 | ScaledCoord(scale, rect.height) + (-topPadding * scale) + topPadding, 31 | 0); 32 | 33 | GUI.matrix = Matrix4x4.TRS(offset, Quaternion.identity, Vector3.one); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Core/BonsaiTreeComponent.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace Bonsai.Core 5 | { 6 | public class BonsaiTreeComponent : MonoBehaviour 7 | { 8 | /// 9 | /// The tree blueprint asset used. 10 | /// 11 | [SerializeField] 12 | public BehaviourTree TreeBlueprint; 13 | 14 | // Tree instance of the blueprint. This is a clone of the tree blueprint asset. 15 | // The tree instance is what runs in game. 16 | internal BehaviourTree treeInstance; 17 | 18 | void Awake() 19 | { 20 | if (TreeBlueprint) 21 | { 22 | treeInstance = BehaviourTree.Clone(TreeBlueprint); 23 | treeInstance.actor = gameObject; 24 | } 25 | else 26 | { 27 | Debug.LogError("The behaviour tree is not set for " + gameObject); 28 | } 29 | } 30 | 31 | void Start() 32 | { 33 | treeInstance.Start(); 34 | treeInstance.BeginTraversal(); 35 | } 36 | 37 | void Update() 38 | { 39 | treeInstance.Update(); 40 | } 41 | 42 | void OnDestroy() 43 | { 44 | Destroy(treeInstance); 45 | } 46 | 47 | /// 48 | /// The tree instance running in game. 49 | /// 50 | public BehaviourTree Tree 51 | { 52 | get { return treeInstance; } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /Editor/Inspectors/GuardInspector.cs: -------------------------------------------------------------------------------- 1 | using Bonsai.Standard; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace Bonsai.Designer 6 | { 7 | [CustomEditor(typeof(Guard))] 8 | public class GuardInspector : BehaviourNodeInspector 9 | { 10 | private Guard guard; 11 | 12 | private readonly GUIStyle linkStyle = new GUIStyle(); 13 | 14 | protected override void OnEnable() 15 | { 16 | base.OnEnable(); 17 | guard = target as Guard; 18 | linkStyle.alignment = TextAnchor.MiddleCenter; 19 | linkStyle.fontStyle = FontStyle.Bold; 20 | } 21 | 22 | protected override void OnBehaviourNodeInspectorGUI() 23 | { 24 | EditorGUILayout.BeginVertical(); 25 | EditorGUILayout.LabelField("Guards Linked", guard.linkedGuards.Count.ToString()); 26 | EditorGUILayout.Space(); 27 | EditorGUILayout.LabelField("Shift + Click to Link Guards", linkStyle); 28 | EditorGUILayout.EndVertical(); 29 | 30 | guard.maxActiveGuards = Mathf.Min(guard.maxActiveGuards, guard.linkedGuards.Count); 31 | 32 | if (GUI.changed) 33 | { 34 | foreach (Guard other in guard.linkedGuards) 35 | { 36 | other.maxActiveGuards = guard.maxActiveGuards; 37 | ParentWindow.UpdateNodeGUI(other); 38 | } 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Standard/Decorators/Interruptor.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Bonsai.Core; 5 | using UnityEngine; 6 | 7 | namespace Bonsai.Standard 8 | { 9 | [BonsaiNode("Tasks/", "Interruptor")] 10 | public class Interruptor : Task 11 | { 12 | [Tooltip("If true, then the interruptable node return success else failure.")] 13 | public bool returnSuccess = false; 14 | 15 | public List linkedInterruptables = new List(); 16 | 17 | public override Status Run() 18 | { 19 | for (int i = 0; i < linkedInterruptables.Count; ++i) 20 | { 21 | Status interruptionStatus = returnSuccess ? Status.Success : Status.Failure; 22 | linkedInterruptables[i].PerformInterruption(interruptionStatus); 23 | } 24 | 25 | return Status.Success; 26 | } 27 | 28 | public override void OnCopy() 29 | { 30 | // Only get the instance version of interruptables under the tree root. 31 | linkedInterruptables = linkedInterruptables 32 | .Where(i => i.PreOrderIndex != kInvalidOrder) 33 | .Select(i => BehaviourTree.GetInstanceVersion(Tree, i)) 34 | .ToList(); 35 | } 36 | 37 | public override BehaviourNode[] GetReferencedNodes() 38 | { 39 | return linkedInterruptables.ToArray(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Utility/FixedSizeStack.cs: -------------------------------------------------------------------------------- 1 | namespace Bonsai.Utility 2 | { 3 | /// 4 | /// A fixed-sized array that provides stack operations. 5 | /// It also provides random-access to contents. 6 | /// 7 | /// 8 | public class FixedSizeStack 9 | { 10 | private readonly T[] container; 11 | 12 | public FixedSizeStack(int length) 13 | { 14 | Count = 0; 15 | container = new T[length]; 16 | } 17 | 18 | /// 19 | /// Reset count and set all entries to the default T value. 20 | /// 21 | public void Clear() 22 | { 23 | Count = 0; 24 | for (int i = 0; i < container.Length; ++i) 25 | { 26 | container[i] = default; 27 | } 28 | } 29 | 30 | /// 31 | /// Reset the count. Entries are left as is. 32 | /// 33 | public void ResetCount() 34 | { 35 | Count = 0; 36 | } 37 | 38 | public T Peek() 39 | { 40 | return container[Count - 1]; 41 | } 42 | 43 | public T Pop() 44 | { 45 | return container[--Count]; 46 | } 47 | 48 | public void Push(T value) 49 | { 50 | container[Count++] = value; 51 | } 52 | 53 | public int Count { get; private set; } 54 | 55 | public T GetValue(int index) 56 | { 57 | return container[index]; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Utility/Result.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace Bonsai.Utility 5 | { 6 | public class Result 7 | { 8 | public TError Error { get; } 9 | public TValue Value { get; } 10 | 11 | public bool Success { get; } 12 | public bool Failure { get { return !Success; } } 13 | 14 | protected Result(TError error) 15 | { 16 | Error = error; 17 | Success = false; 18 | } 19 | 20 | protected Result(TValue value) 21 | { 22 | Value = value; 23 | Success = true; 24 | } 25 | 26 | public static Result Fail(TError error) 27 | { 28 | return new Result(error); 29 | } 30 | 31 | public static Result Ok(TValue value) 32 | { 33 | return new Result(value); 34 | } 35 | 36 | public Result OnSuccess(Action action) 37 | { 38 | if (Success) 39 | { 40 | action(Value); 41 | 42 | // Propagate the value. 43 | return Ok(Value); 44 | } 45 | 46 | // Propagate the error. 47 | return Fail(Error); 48 | } 49 | 50 | 51 | public Result OnFailure(Action action) 52 | { 53 | if (Failure) 54 | { 55 | action(Error); 56 | return Fail(Error); 57 | } 58 | 59 | return Ok(Value); 60 | } 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Standard/Composites/RandomSequence.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | [BonsaiNode("Composites/", "Shuffle")] 7 | public class RandomSequence : Sequence 8 | { 9 | private int[] branchOrder; 10 | 11 | public override void OnStart() 12 | { 13 | int childCount = ChildCount(); 14 | branchOrder = new int[childCount]; 15 | 16 | // Fill in the orders with the default index order. 17 | for (int i = 0; i < childCount; ++i) 18 | { 19 | branchOrder[i] = i; 20 | } 21 | } 22 | 23 | public override void OnEnter() 24 | { 25 | ShuffleChildOrder(); 26 | base.OnEnter(); 27 | } 28 | 29 | public override BehaviourNode CurrentChild() 30 | { 31 | if (CurrentChildIndex >= branchOrder.Length) 32 | { 33 | return null; 34 | } 35 | 36 | int index = branchOrder[CurrentChildIndex]; 37 | return Children[index]; 38 | } 39 | 40 | private void ShuffleChildOrder() 41 | { 42 | int childCount = ChildCount(); 43 | 44 | for (int i = 0; i < childCount; i++) 45 | { 46 | int indexPivot = UnityEngine.Random.Range(0, childCount); 47 | 48 | // Swap the i-th and pivot elements. 49 | int tmp = branchOrder[i]; 50 | branchOrder[i] = branchOrder[indexPivot]; 51 | branchOrder[indexPivot] = tmp; 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /Standard/Composites/RandomSelector.cs: -------------------------------------------------------------------------------- 1 | 2 | using Bonsai.Core; 3 | 4 | namespace Bonsai.Standard 5 | { 6 | [BonsaiNode("Composites/", "ShuffleQuestion")] 7 | public class RandomSelector : Selector 8 | { 9 | private int[] branchOrder; 10 | 11 | public override void OnStart() 12 | { 13 | int childCount = ChildCount(); 14 | branchOrder = new int[childCount]; 15 | 16 | // Fill in the orders with the default index order. 17 | for (int i = 0; i < childCount; ++i) 18 | { 19 | branchOrder[i] = i; 20 | } 21 | } 22 | 23 | public override void OnEnter() 24 | { 25 | ShuffleChildOrder(); 26 | base.OnEnter(); 27 | } 28 | 29 | public override BehaviourNode CurrentChild() 30 | { 31 | if (CurrentChildIndex >= branchOrder.Length) 32 | { 33 | return null; 34 | } 35 | 36 | int index = branchOrder[CurrentChildIndex]; 37 | return Children[index]; 38 | } 39 | 40 | private void ShuffleChildOrder() 41 | { 42 | int childCount = ChildCount(); 43 | 44 | for (int i = 0; i < childCount; i++) 45 | { 46 | int indexPivot = UnityEngine.Random.Range(0, childCount); 47 | 48 | // Swap the i-th and pivot elements. 49 | int tmp = branchOrder[i]; 50 | branchOrder[i] = branchOrder[indexPivot]; 51 | branchOrder[indexPivot] = tmp; 52 | } 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /Standard/ConditionalAborts/TimeLimit.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | /// 8 | /// Sets a time limit for the child to finish executing. 9 | /// If the time is up, the decorator returns failure. 10 | /// 11 | [BonsaiNode("Conditional/", "Condition")] 12 | public sealed class TimeLimit : ConditionalAbort 13 | { 14 | [ShowAtRuntime] 15 | [UnityEngine.SerializeField] 16 | public Utility.Timer timer = new Utility.Timer(); 17 | 18 | void OnEnable() 19 | { 20 | abortType = AbortType.Self; 21 | } 22 | 23 | public override void OnStart() 24 | { 25 | timer.OnTimeout += OnTimeout; 26 | } 27 | 28 | public override void OnEnter() 29 | { 30 | Tree.AddTimer(timer); 31 | timer.Start(); 32 | base.OnEnter(); 33 | } 34 | 35 | public override void OnExit() 36 | { 37 | Tree.RemoveTimer(timer); 38 | } 39 | 40 | public override bool Condition() 41 | { 42 | return timer.IsDone; 43 | } 44 | 45 | private void OnTimeout() 46 | { 47 | // Timer complete, notify abort. 48 | Evaluate(); 49 | } 50 | 51 | public override void Description(StringBuilder builder) 52 | { 53 | base.Description(builder); 54 | builder.AppendLine(); 55 | builder.AppendFormat("Abort and fail after {0:0.00}s", timer.interval); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /Utility/TypeExtensions.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace Bonsai.Utility 6 | { 7 | public static class TypeExtensions 8 | { 9 | 10 | public static readonly Dictionary SimpleTypeNames = new Dictionary() 11 | { 12 | { "Boolean", "bool"}, 13 | { "Int32", "int"}, 14 | { "Single", "float"}, 15 | { "Double", "double"}, 16 | { "String", "string"}, 17 | }; 18 | 19 | /// 20 | /// Get the simplified, alternative name. 21 | /// 22 | public static string SimplifiedName(Type type) 23 | { 24 | string name = type.Name; 25 | 26 | if (name == "Object") 27 | { 28 | name = typeof(UnityEngine.Object) == type ? "UnityObject" : "object"; 29 | } 30 | else 31 | { 32 | if (SimpleTypeNames.TryGetValue(name, out string simple)) 33 | name = simple; 34 | } 35 | 36 | return name; 37 | } 38 | 39 | /// 40 | /// Human-readable type name. 41 | /// 42 | public static string NiceName(Type type) 43 | { 44 | string name = SimplifiedName(type); 45 | 46 | // Trim off any generic type naming. 47 | int genericIndex = name.IndexOf('`'); 48 | if (genericIndex >= 0) 49 | { 50 | name = name.Substring(0, genericIndex); 51 | } 52 | 53 | return name; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/IsValueSet.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Text; 4 | using Bonsai.Core; 5 | using UnityEngine; 6 | 7 | namespace Bonsai.Standard 8 | { 9 | /// 10 | /// Tests if the value at a given key is not set to its default value. 11 | /// 12 | [BonsaiNode("Conditional/", "Condition")] 13 | public class IsValueSet : ConditionalAbort 14 | { 15 | [Tooltip("The key to check if it has a value set.")] 16 | public string key; 17 | 18 | private Action OnBlackboardChanged; 19 | 20 | public override void OnStart() 21 | { 22 | OnBlackboardChanged = delegate (Blackboard.KeyEvent e) 23 | { 24 | if (key == e.Key) 25 | { 26 | Evaluate(); 27 | } 28 | }; 29 | } 30 | 31 | public override bool Condition() 32 | { 33 | return Blackboard.IsSet(key); 34 | } 35 | 36 | protected override void OnObserverBegin() 37 | { 38 | Blackboard.AddObserver(OnBlackboardChanged); 39 | } 40 | 41 | protected override void OnObserverEnd() 42 | { 43 | Blackboard.RemoveObserver(OnBlackboardChanged); 44 | } 45 | 46 | public override void Description(StringBuilder builder) 47 | { 48 | base.Description(builder); 49 | builder.AppendLine(); 50 | 51 | if (key == null || key.Length == 0) 52 | { 53 | builder.Append("No key is set to check"); 54 | } 55 | else 56 | { 57 | builder.AppendFormat("Blackboard key: {0}", key); 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Standard/Tasks/Include.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Standard 7 | { 8 | [BonsaiNode("Tasks/", "TreeIcon")] 9 | public class Include : Task 10 | { 11 | [Tooltip("The sub-tree to run when this task executes.")] 12 | public BehaviourTree subtreeAsset; 13 | 14 | public BehaviourTree RunningSubTree { get; private set; } 15 | 16 | public override void OnStart() 17 | { 18 | if (subtreeAsset) 19 | { 20 | RunningSubTree = BehaviourTree.Clone(subtreeAsset); 21 | RunningSubTree.actor = Actor; 22 | RunningSubTree.Start(); 23 | } 24 | } 25 | 26 | public override void OnEnter() 27 | { 28 | RunningSubTree.BeginTraversal(); 29 | } 30 | 31 | public override void OnExit() 32 | { 33 | if (RunningSubTree.IsRunning()) 34 | { 35 | RunningSubTree.Interrupt(); 36 | } 37 | } 38 | 39 | public override Status Run() 40 | { 41 | if (RunningSubTree) 42 | { 43 | RunningSubTree.Update(); 44 | return RunningSubTree.IsRunning() 45 | ? Status.Running 46 | : RunningSubTree.LastStatus(); 47 | } 48 | 49 | // No tree was included. Just fail. 50 | return Status.Failure; 51 | } 52 | 53 | public override void Description(StringBuilder builder) 54 | { 55 | if (subtreeAsset) 56 | { 57 | builder.AppendFormat("Include {0}", subtreeAsset.name); 58 | } 59 | else 60 | { 61 | builder.Append("Tree not set"); 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Tests/CoreTreeTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Bonsai.Core; 3 | using Bonsai.Standard; 4 | 5 | namespace Tests 6 | { 7 | public class CoreTreeTests 8 | { 9 | // A Test behaves as an ordinary method 10 | [Test] 11 | public void TreeCloning() 12 | { 13 | BehaviourTree tree = Helper.CreateTree(); 14 | 15 | var root = Helper.CreateNode(); 16 | var alpha = Helper.PassNode(); 17 | var beta = Helper.PassNode(); 18 | var delta = Helper.PassNode(); 19 | root.SetChildren(new[] { alpha, beta, delta }); 20 | tree.SetNodes(root); 21 | 22 | BehaviourTree cloneTree = BehaviourTree.Clone(tree); 23 | Assert.AreEqual(4, cloneTree.Nodes.Length); 24 | 25 | Assert.AreEqual(0, cloneTree.Nodes[0].PreOrderIndex); 26 | Assert.AreEqual(1, cloneTree.Nodes[1].PreOrderIndex); 27 | Assert.AreEqual(2, cloneTree.Nodes[2].PreOrderIndex); 28 | Assert.AreEqual(3, cloneTree.Nodes[3].PreOrderIndex); 29 | 30 | Assert.AreEqual(0, cloneTree.Nodes[0].ChildOrder); 31 | Assert.AreEqual(0, cloneTree.Nodes[1].ChildOrder); 32 | Assert.AreEqual(1, cloneTree.Nodes[2].ChildOrder); 33 | Assert.AreEqual(2, cloneTree.Nodes[3].ChildOrder); 34 | 35 | var parent = cloneTree.Root; 36 | Assert.AreEqual(parent, cloneTree.Nodes[1].Parent); 37 | Assert.AreEqual(parent, cloneTree.Nodes[2].Parent); 38 | Assert.AreEqual(parent, cloneTree.Nodes[3].Parent); 39 | 40 | var result = Helper.RunBehaviourTree(cloneTree); 41 | Assert.AreEqual(BehaviourNode.Status.Success, result); 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Standard/Decorators/Repeater.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | [BonsaiNode("Decorators/", "RepeatArrow")] 8 | public sealed class Repeater : Decorator 9 | { 10 | public int loopCount = 1; 11 | public bool infiniteLoop = false; 12 | 13 | private int loopCounter = 0; 14 | 15 | public override void OnEnter() 16 | { 17 | loopCounter = 0; 18 | } 19 | 20 | public override Status Run() 21 | { 22 | // Infinite loop always returns running and always traverses the child. 23 | if (infiniteLoop) 24 | { 25 | Iterator.Traverse(child); 26 | return Status.Running; 27 | } 28 | 29 | else 30 | { 31 | // If we have not exceeded the loop count then traverse the child. 32 | if (loopCounter < loopCount) 33 | { 34 | loopCounter++; 35 | Iterator.Traverse(child); 36 | return Status.Running; 37 | } 38 | 39 | // Finished looping, return what the child returns. 40 | else 41 | { 42 | return Iterator.LastChildExitStatus.GetValueOrDefault(Status.Failure); 43 | } 44 | } 45 | } 46 | 47 | public override void Description(StringBuilder builder) 48 | { 49 | if (infiniteLoop) 50 | { 51 | builder.Append("Loop forever"); 52 | } 53 | else if (loopCount < 1) 54 | { 55 | builder.Append("Don't loop"); 56 | } 57 | else if (loopCount > 1) 58 | { 59 | builder.AppendFormat("Loop {0} times", loopCount); 60 | } 61 | else 62 | { 63 | builder.Append("Loop once"); 64 | } 65 | } 66 | 67 | } 68 | } -------------------------------------------------------------------------------- /Utility/UpdateList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Bonsai.Utility 5 | { 6 | /// 7 | /// Defers list modification so it is safe to traverse during an update call. 8 | /// 9 | public class UpdateList 10 | { 11 | private readonly List data = new List(); 12 | private readonly List addQueue = new List(); 13 | private readonly List removeQueue = new List(); 14 | 15 | private readonly Predicate IsInRemovalQueue; 16 | 17 | public IReadOnlyList Data { get { return data; } } 18 | 19 | public UpdateList() 20 | { 21 | IsInRemovalQueue = delegate (T value) 22 | { 23 | return removeQueue.Contains(value); 24 | }; 25 | } 26 | 27 | /// 28 | /// Queues an item to add to the list. 29 | /// 30 | /// The item to add. 31 | public void Add(T item) 32 | { 33 | addQueue.Add(item); 34 | } 35 | 36 | /// 37 | /// Queues an item for removal from the list. 38 | /// 39 | /// The item to remove. 40 | public void Remove(T item) 41 | { 42 | removeQueue.Add(item); 43 | } 44 | 45 | /// 46 | /// Removes and adds pending items in the modification queues. 47 | /// 48 | public void AddAndRemoveQueued() 49 | { 50 | if (removeQueue.Count != 0) 51 | { 52 | data.RemoveAll(IsInRemovalQueue); 53 | removeQueue.Clear(); 54 | } 55 | 56 | if (addQueue.Count != 0) 57 | { 58 | data.AddRange(addQueue); 59 | addQueue.Clear(); 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /.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/master/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 | # Asset meta data should only be ignored when the corresponding asset is also ignored 18 | !/[Aa]ssets/**/*.meta 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 | *.unitypackage 61 | 62 | # Crashlytics generated file 63 | crashlytics-build.properties 64 | 65 | # Packed Addressables 66 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 67 | 68 | # Temporary auto-generated Android Assets 69 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 70 | /[Aa]ssets/[Ss]treamingAssets/aa/* 71 | 72 | # Meta files for these are not important. 73 | LICENSE*.meta 74 | README*.meta 75 | 76 | /Experimental* 77 | -------------------------------------------------------------------------------- /Core/Service.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | 4 | namespace Bonsai.Core 5 | { 6 | public abstract class Service : Decorator 7 | { 8 | public bool restartTimerOnEnter = true; 9 | 10 | [ShowAtRuntime] 11 | [UnityEngine.SerializeField] 12 | public Utility.Timer timer = new Utility.Timer(); 13 | 14 | public sealed override void OnStart() 15 | { 16 | timer.OnTimeout += ServiceTick; 17 | timer.AutoRestart = true; 18 | } 19 | 20 | public sealed override void OnEnter() 21 | { 22 | Tree.AddTimer(timer); 23 | 24 | if (timer.IsDone || restartTimerOnEnter) 25 | { 26 | timer.Start(); 27 | } 28 | 29 | base.OnEnter(); 30 | } 31 | 32 | public sealed override void OnExit() 33 | { 34 | Tree.RemoveTimer(timer); 35 | } 36 | 37 | public sealed override Status Run() 38 | { 39 | // Simply pass the status. 40 | return Iterator.LastChildExitStatus.GetValueOrDefault(Status.Failure); 41 | } 42 | 43 | /// 44 | /// Apply changes by the service 45 | /// 46 | protected abstract void ServiceTick(); 47 | 48 | public override void Description(StringBuilder builder) 49 | { 50 | if (timer.deviation == 0f) 51 | { 52 | builder.AppendFormat("Tick {0:0.00}s", timer.interval); 53 | } 54 | else 55 | { 56 | float lower = timer.interval - timer.deviation; 57 | float upper = timer.interval + timer.deviation; 58 | builder.AppendFormat("Tick {0:0.00}s - {1:0.00}s", lower, upper); 59 | } 60 | 61 | builder.AppendLine(); 62 | builder.Append(restartTimerOnEnter ? "Restart timer on enter" : "Resume timer on enter"); 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Editor/Actions/EditorAreaSelect.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Designer 7 | { 8 | public static class EditorAreaSelect 9 | { 10 | /// 11 | /// Returns the nodes under the area. 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | /// 18 | public static IEnumerable NodesUnderArea( 19 | IEnumerable nodes, 20 | Vector2 startCanvasSpace, 21 | Vector2 endCanvasSpace) 22 | { 23 | Rect selectionArea = SelectionArea(startCanvasSpace, endCanvasSpace); 24 | return nodes.Where(node => selectionArea.Overlaps(node.RectPositon)); 25 | } 26 | 27 | /// 28 | /// Returns a rectangle between the endpoints. 29 | /// 30 | /// 31 | public static Rect SelectionArea(Vector2 start, Vector2 end) 32 | { 33 | // Need to find the proper min and max values to 34 | // create a rect without negative width/height values. 35 | float xmin, xmax; 36 | float ymin, ymax; 37 | 38 | if (start.x < end.x) 39 | { 40 | xmin = start.x; 41 | xmax = end.x; 42 | } 43 | 44 | else 45 | { 46 | xmax = start.x; 47 | xmin = end.x; 48 | } 49 | 50 | if (start.y < end.y) 51 | { 52 | ymin = start.y; 53 | ymax = end.y; 54 | } 55 | 56 | else 57 | { 58 | ymax = start.y; 59 | ymin = end.y; 60 | } 61 | 62 | return Rect.MinMaxRect(xmin, ymin, xmax, ymax); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Editor/Actions/EditorNodeCreation.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Designer 7 | { 8 | /// 9 | /// Handles creation and deletion of nodes. 10 | /// 11 | public static class EditorNodeCreation 12 | { 13 | public static BonsaiNode DuplicateSingle(BonsaiCanvas canvas, BonsaiNode original) 14 | { 15 | BonsaiNode duplicate = canvas.CreateNode(original.Behaviour.GetType()); 16 | 17 | // Duplicate nodes are placed offset from the original. 18 | duplicate.Position = original.Position + Vector2.one * 40f; 19 | 20 | return duplicate; 21 | } 22 | 23 | /// 24 | /// Duplicate multiple nodes and preserve the connections between parent and child nodes. 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | public static List DuplicateMultiple(BonsaiCanvas canvas, IEnumerable originals) 31 | { 32 | var duplicateMap = originals.ToDictionary(og => og, og => DuplicateSingle(canvas, og)); 33 | 34 | // Reconstruct connection in clone nodes. 35 | foreach (BonsaiNode original in originals) 36 | { 37 | for (int i = 0; i < original.ChildCount(); i++) 38 | { 39 | // Only consider children if they were also cloned. 40 | if (duplicateMap.TryGetValue(original.GetChildAt(i), out BonsaiNode cloneChild)) 41 | { 42 | BonsaiNode cloneParent = duplicateMap[original]; 43 | cloneChild.SetParent(cloneParent); 44 | } 45 | } 46 | } 47 | 48 | return duplicateMap.Values.ToList(); 49 | } 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Core/Decorator.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace Bonsai.Core 5 | { 6 | /// 7 | /// The base class for all decorators. 8 | /// 9 | public abstract class Decorator : BehaviourNode 10 | { 11 | [SerializeField, HideInInspector] 12 | protected BehaviourNode child; 13 | 14 | /// 15 | /// Gets the child. 16 | /// 17 | public BehaviourNode Child 18 | { 19 | get { return child; } 20 | } 21 | 22 | /// 23 | /// Default behaviour is to immediately try to traverse its child. 24 | /// 25 | public override void OnEnter() 26 | { 27 | if (child) 28 | { 29 | Iterator.Traverse(child); 30 | } 31 | } 32 | 33 | /// 34 | /// Set the child for the decorator node. 35 | /// 36 | /// This should be called once when the tree is being built, 37 | /// before Tree Start() and never during Tree Update() 38 | /// 39 | /// 40 | public void SetChild(BehaviourNode node) 41 | { 42 | child = node; 43 | if (child != null) 44 | { 45 | child.Parent = this; 46 | child.indexOrder = 0; 47 | } 48 | } 49 | 50 | public sealed override void OnAbort(int childIndex) { } 51 | 52 | public override void OnCompositeParentExit() 53 | { 54 | // Propogate composite parent exit through decorator chain only. 55 | // No need to call for composite children since composite nodes handle that. 56 | if (child && child.IsDecorator()) 57 | { 58 | child.OnCompositeParentExit(); 59 | } 60 | } 61 | 62 | public sealed override int MaxChildCount() 63 | { 64 | return 1; 65 | } 66 | 67 | public sealed override int ChildCount() 68 | { 69 | return child ? 1 : 0; 70 | } 71 | 72 | public sealed override BehaviourNode GetChildAt(int index) 73 | { 74 | return child; 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /Standard/ConditionalAborts/Cooldown.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | 5 | namespace Bonsai.Standard 6 | { 7 | /// 8 | /// Locks the tree execution for a certain amount of time. 9 | /// 10 | [BonsaiNode("Conditional/", "Condition")] 11 | public class Cooldown : ConditionalAbort 12 | { 13 | [ShowAtRuntime] 14 | [UnityEngine.SerializeField] 15 | public Utility.Timer timer = new Utility.Timer(); 16 | 17 | public override void OnStart() 18 | { 19 | // When the timer finishes, automatically unregister from tree update. 20 | timer.OnTimeout += RemoveTimerFromTreeTick; 21 | } 22 | 23 | public override void OnEnter() 24 | { 25 | // We can only traverse the child if the cooldown is inactive. 26 | if (timer.IsDone) 27 | { 28 | Iterator.Traverse(child); 29 | } 30 | } 31 | 32 | public override void OnExit() 33 | { 34 | // Only start time if not yet running 35 | if (timer.IsDone) 36 | { 37 | Tree.AddTimer(timer); 38 | timer.Start(); 39 | } 40 | } 41 | 42 | // Abort if the cooldown status changed. 43 | public override bool Condition() 44 | { 45 | return timer.IsDone; 46 | } 47 | 48 | public override Status Run() 49 | { 50 | // If the cooldown is active, fail to lock the branch from running. 51 | if (timer.IsRunning) 52 | { 53 | return Status.Failure; 54 | } 55 | 56 | // Cooldown is not active, pass the child branch status. 57 | return Iterator.LastChildExitStatus.GetValueOrDefault(Status.Failure); 58 | } 59 | 60 | private void RemoveTimerFromTreeTick() 61 | { 62 | Tree.RemoveTimer(timer); 63 | 64 | // Time is done. Notify abort. 65 | Evaluate(); 66 | } 67 | 68 | public override void Description(StringBuilder builder) 69 | { 70 | base.Description(builder); 71 | builder.AppendLine(); 72 | builder.AppendFormat("Lock execution for {0:0.00}s", timer.interval); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /Standard/Tasks/Print.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Text; 3 | using Bonsai.Core; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Standard 7 | { 8 | /// 9 | /// Displays a message. 10 | /// 11 | [BonsaiNode("Tasks/", "Log")] 12 | public class Print : Task 13 | { 14 | public enum LogType { Normal, Warning, Error }; 15 | 16 | [Multiline] 17 | public string message = "Print Node"; 18 | 19 | [Tooltip("The type of message to display.")] 20 | public LogType logType = LogType.Normal; 21 | 22 | public override Status Run() 23 | { 24 | switch (logType) 25 | { 26 | case LogType.Normal: 27 | Debug.Log(message); 28 | break; 29 | 30 | case LogType.Warning: 31 | Debug.LogWarning(message); 32 | break; 33 | 34 | case LogType.Error: 35 | Debug.LogError(message); 36 | break; 37 | } 38 | 39 | return Status.Success; 40 | } 41 | 42 | public override void Description(StringBuilder builder) 43 | { 44 | // Nothing to display. 45 | if (message.Length == 0) 46 | { 47 | return; 48 | } 49 | 50 | string displayed = message; 51 | 52 | // Only consider display the message up to the newline. 53 | int newLineIndex = message.IndexOf('\n'); 54 | if (newLineIndex >= 0) 55 | { 56 | displayed = message.Substring(0, newLineIndex); 57 | } 58 | 59 | // Nothing to display. 60 | if (displayed.Length == 0) 61 | { 62 | return; 63 | } 64 | 65 | if (logType != LogType.Normal) 66 | { 67 | builder.AppendLine(logType.ToString()); 68 | } 69 | 70 | // Cap the message length to display to keep things compact. 71 | int maxCharacters = 20; 72 | if (displayed.Length > maxCharacters) 73 | { 74 | builder.Append(displayed.Substring(0, maxCharacters)); 75 | builder.Append("..."); 76 | } 77 | else 78 | { 79 | builder.Append(displayed); 80 | } 81 | } 82 | 83 | } 84 | } -------------------------------------------------------------------------------- /Editor/Inspectors/IsValueOfTypeInspector.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using Bonsai.Standard; 7 | using UnityEditor; 8 | 9 | namespace Bonsai.Designer 10 | { 11 | [CustomEditor(typeof(IsValueOfType))] 12 | public class IsValueOfTypeInspector : BehaviourNodeInspector 13 | { 14 | int index = 0; 15 | 16 | protected override void OnEnable() 17 | { 18 | base.OnEnable(); 19 | var isValueOfTypeNode = target as IsValueOfType; 20 | index = Array.FindIndex(registerTypes, t => t == isValueOfTypeNode.type); 21 | index = Math.Max(0, index); 22 | } 23 | 24 | protected override void OnBehaviourNodeInspectorGUI() 25 | { 26 | var isValueOfTypeNode = target as IsValueOfType; 27 | 28 | EditorGUILayout.BeginHorizontal(); 29 | EditorGUILayout.LabelField("Type: "); 30 | 31 | index = EditorGUILayout.Popup(index, registerTypeNames); 32 | isValueOfTypeNode.type = registerTypes[index]; 33 | 34 | EditorGUILayout.EndHorizontal(); 35 | } 36 | 37 | #if UNITY_EDITOR 38 | 39 | /// 40 | /// The types that can be selected from the Inspector. 41 | /// 42 | public static Type[] registerTypes; 43 | public static string[] registerTypeNames; 44 | 45 | static IsValueOfTypeInspector() 46 | { 47 | CollectRegisterTypes(); 48 | } 49 | 50 | private static void CollectRegisterTypes() 51 | { 52 | var types = new List 53 | { 54 | typeof(UnityEngine.GameObject), 55 | typeof(UnityEngine.Component), 56 | typeof(UnityEngine.Transform), 57 | 58 | typeof(int), 59 | typeof(bool), 60 | typeof(float), 61 | typeof(string), 62 | typeof(UnityEngine.Vector2), 63 | typeof(UnityEngine.Vector3), 64 | typeof(UnityEngine.Quaternion), 65 | 66 | typeof(List<>) 67 | }; 68 | 69 | registerTypes = types.ToArray(); 70 | registerTypeNames = types.Select(t => Utility.TypeExtensions.NiceName(t)).ToArray(); 71 | } 72 | 73 | #endif 74 | } 75 | } -------------------------------------------------------------------------------- /Editor/Actions/EditorMultiDrag.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | 6 | namespace Bonsai.Designer 7 | { 8 | public static class EditorMultiDrag 9 | { 10 | public struct DraggingNode 11 | { 12 | public BonsaiNode node; 13 | public Vector2 offset; 14 | } 15 | 16 | /// 17 | /// Gets all the subroots to do a multi drag. 18 | /// Only subroots are dragged since moving a root moves then children. 19 | /// 20 | /// 21 | /// 22 | public static IReadOnlyList StartDrag(IReadOnlyList nodes, Vector2 dragStartPosition) 23 | { 24 | var draggingSubroots = new List(); 25 | 26 | // Find the selected roots to apply dragging. 27 | foreach (BonsaiNode node in nodes) 28 | { 29 | // Unparented nodes are roots. 30 | // Isolated nodes are their own roots. 31 | if (node.IsOrphan()) 32 | { 33 | // Calculate the relative position from the node for dragging. 34 | var draggingRoot = new DraggingNode 35 | { 36 | node = node, 37 | offset = dragStartPosition - node.Center 38 | }; 39 | 40 | draggingSubroots.Add(draggingRoot); 41 | } 42 | 43 | // Nodes that have a selected parent are not selected roots. 44 | else if (!nodes.Contains(node.Parent)) 45 | { 46 | // Calculate the relative position from the node for dragging. 47 | var draggingRoot = new DraggingNode 48 | { 49 | node = node, 50 | offset = dragStartPosition - node.Center 51 | }; 52 | 53 | draggingSubroots.Add(draggingRoot); 54 | } 55 | } 56 | 57 | return draggingSubroots; 58 | } 59 | 60 | public static void Drag(Vector2 dragPosition, IReadOnlyList nodes) 61 | { 62 | foreach (DraggingNode root in nodes) 63 | { 64 | EditorSingleDrag.SetSubtreePosition(root.node, dragPosition, root.offset); 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/CompareEntries.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Text; 4 | using Bonsai.Core; 5 | using UnityEngine; 6 | 7 | namespace Bonsai.Standard 8 | { 9 | /// 10 | /// Compares two values from the blackboard. 11 | /// 12 | [BonsaiNode("Conditional/", "Condition")] 13 | public class CompareEntries : ConditionalAbort 14 | { 15 | public string key1; 16 | public string key2; 17 | 18 | [Tooltip("If the comparison should test for inequality")] 19 | public bool compareInequality = false; 20 | 21 | private Action OnBlackboardChanged; 22 | 23 | public override void OnStart() 24 | { 25 | OnBlackboardChanged = delegate (Blackboard.KeyEvent e) 26 | { 27 | if (e.Key == key1 || e.Key == key2) 28 | { 29 | Evaluate(); 30 | } 31 | }; 32 | 33 | } 34 | 35 | public override bool Condition() 36 | { 37 | Blackboard bb = Blackboard; 38 | 39 | // If any of the keys is non-existant then return false. 40 | if (!bb.Contains(key1) || !bb.Contains(key2)) 41 | { 42 | return false; 43 | } 44 | 45 | object val1 = bb.Get(key1); 46 | object val2 = bb.Get(key2); 47 | 48 | // Use the polymorphic equals so value types are properly tested as well 49 | // as taking into account custom equality operations. 50 | bool bResult = val1.Equals(val2); 51 | 52 | return compareInequality ? !bResult : bResult; 53 | } 54 | 55 | protected override void OnObserverBegin() 56 | { 57 | Blackboard.AddObserver(OnBlackboardChanged); 58 | } 59 | 60 | protected override void OnObserverEnd() 61 | { 62 | Blackboard.RemoveObserver(OnBlackboardChanged); 63 | } 64 | 65 | public override void Description(StringBuilder builder) 66 | { 67 | base.Description(builder); 68 | builder.AppendLine(); 69 | 70 | if (string.IsNullOrEmpty(key1) || string.IsNullOrEmpty(key2)) 71 | { 72 | builder.AppendLine("Keys are not set"); 73 | } 74 | 75 | else 76 | { 77 | builder.AppendFormat("Compare {0} and {1}", key1, key2); 78 | } 79 | 80 | } 81 | 82 | } 83 | } -------------------------------------------------------------------------------- /Utility/Timer.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace Bonsai.Utility 5 | { 6 | [Serializable] 7 | public class Timer 8 | { 9 | /// 10 | /// The wait time for the timer in seconds. 11 | /// 12 | [UnityEngine.Min(0)] 13 | public float interval = 1f; 14 | 15 | /// 16 | /// The random deviation of the interval. 17 | /// 18 | /// If not zero, a random value between [-deviation, +deviation] 19 | /// is added to on 20 | /// 21 | /// 22 | [UnityEngine.Tooltip("Adds a random range value to the interval between [-Deviation, +Deviation]")] 23 | [UnityEngine.Min(0)] 24 | public float deviation = 0f; 25 | 26 | /// 27 | /// The time left on the timer. 28 | /// 29 | public float TimeLeft { get; private set; } = 0f; 30 | 31 | /// 32 | /// If the timer should itself again after time out. 33 | /// 34 | public bool AutoRestart { get; set; } = false; 35 | 36 | /// 37 | /// Occurs when reaches 0. 38 | /// 39 | public event Action OnTimeout = delegate { }; 40 | 41 | /// 42 | /// Starts the timer. Time left is reset to the interval and applies random deviation. 43 | /// 44 | public void Start() 45 | { 46 | TimeLeft = interval; 47 | 48 | if (deviation != 0f) 49 | { 50 | TimeLeft += UnityEngine.Random.Range(-deviation, deviation); 51 | } 52 | } 53 | 54 | /// 55 | /// Updates the timer. 56 | /// 57 | /// The elapsed time seconds to update the timer. 58 | public void Update(float delta) 59 | { 60 | if (TimeLeft > 0f) 61 | { 62 | TimeLeft -= delta; 63 | if (IsDone) 64 | { 65 | OnTimeout(); 66 | if (AutoRestart) 67 | { 68 | Start(); 69 | } 70 | } 71 | } 72 | } 73 | 74 | public bool IsDone { get { return TimeLeft <= 0f; } } 75 | 76 | public bool IsRunning { get { return !IsDone; } } 77 | 78 | public override string ToString() 79 | { 80 | return TimeLeft.ToString(); 81 | } 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /Editor/Actions/EditorSingleDrag.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | 4 | namespace Bonsai.Designer 5 | { 6 | public static class EditorSingleDrag 7 | { 8 | /// 9 | /// Returns the offset for the drag operation. 10 | /// 11 | /// 12 | /// 13 | public static Vector2 StartDrag(BonsaiNode node, Vector2 dragStartPosition) 14 | { 15 | return dragStartPosition - node.Center; 16 | } 17 | 18 | public static void Drag(BonsaiNode node, Vector2 position, Vector2 offset) 19 | { 20 | SetSubtreePosition(node, position, offset); 21 | } 22 | 23 | /// 24 | /// Sets the position of the subtree at an offset. 25 | /// 26 | /// The drag position for the subtree. 27 | /// Additional offset. 28 | /// The subtree root. 29 | public static void SetSubtreePosition(BonsaiNode root, Vector2 dragPosition, Vector2 offset) 30 | { 31 | float min = float.MinValue; 32 | 33 | if (!root.IsOrphan()) 34 | { 35 | float nodeTop = root.RectPositon.yMin; 36 | float parentBottom = root.Parent.RectPositon.yMax; 37 | 38 | // The root cannot be above its parent. 39 | if (nodeTop < parentBottom) 40 | { 41 | min = parentBottom; 42 | } 43 | } 44 | 45 | // Record the old position to later determine the translation delta to move children. 46 | Vector2 oldPosition = root.Center; 47 | 48 | // Clamp the position so it does not go above the parent. 49 | Vector2 newPosition = dragPosition - offset; 50 | newPosition.y = Mathf.Clamp(newPosition.y, min, float.MaxValue); 51 | 52 | float snap = BonsaiPreferences.Instance.snapStep; 53 | 54 | root.Center = Utility.MathExtensions.SnapPosition(newPosition, snap); 55 | 56 | // Calculate the change of position of the root. 57 | Vector2 pan = root.Center - oldPosition; 58 | 59 | // Move the entire subtree of the root. 60 | // For all children, pan by the same amount that the parent changed by. 61 | foreach (BonsaiNode node in Core.TreeTraversal.PreOrder(root).Skip(1)) 62 | { 63 | node.Center = Utility.MathExtensions.SnapPosition(node.Center + pan, snap); 64 | } 65 | } 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Editor/Resources/DefaultBonsaiPreferences.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: 11500000, guid: 524b8d4bdc9aaf143b5ae1195caba6d6, type: 3} 13 | m_Name: DefaultBonsaiPreferences 14 | m_EditorClassIdentifier: 15 | snapStep: 12 16 | zoomDelta: 0.2 17 | minZoom: 1 18 | maxZoom: 8 19 | panSpeed: 1.2 20 | gridTexture: {fileID: 2800000, guid: 4ab4e605fe422164da65569c46a161d2, type: 3} 21 | failureSymbol: {fileID: 2800000, guid: 8db2b847ab6b6434c9da1e0cf721fd8e, type: 3} 22 | successSymbol: {fileID: 2800000, guid: 39cfff267dd954642b26f231c7a997ad, type: 3} 23 | nodeBackgroundTexture: {fileID: 2800000, guid: 6c5508e99038cdf46bb29a177e477d6d, 24 | type: 3} 25 | nodeGradient: {fileID: 2800000, guid: c453f51bbb9d4134d86679c771689df6, type: 3} 26 | portTexture: {fileID: 2800000, guid: dfda76d4e735e7a47bcf756d5d90c44d, type: 3} 27 | compositeColor: {r: 0.3773585, g: 0.3773585, b: 0.3773585, a: 1} 28 | decoratorColor: {r: 0.4553469, g: 0.38719293, b: 0.7264151, a: 1} 29 | conditionalColor: {r: 0.36663404, g: 0.7264151, b: 0.72088, a: 1} 30 | serviceColor: {r: 0.990566, g: 0.6200383, b: 0.13550198, a: 1} 31 | taskColor: {r: 0.59607846, g: 0.6431373, b: 0.5372549, a: 1} 32 | defaultNodeBackgroundColor: {r: 0.2924528, g: 0.2924528, b: 0.2924528, a: 1} 33 | selectedColor: {r: 0.3443396, g: 0.62303853, b: 1, a: 1} 34 | runningColor: {r: 0.2971698, g: 1, b: 0.61701846, a: 1} 35 | abortColor: {r: 0.3722855, g: 0.8867924, b: 0.8457736, a: 1} 36 | referenceColor: {r: 1, g: 0.77234, b: 0.031372547, a: 1} 37 | evaluateColor: {r: 0, g: 0.42990875, b: 1, a: 1} 38 | rootSymbolColor: {r: 0.90977204, g: 1, b: 0, a: 1} 39 | runningStatusColor: {r: 0.4221253, g: 0.9622642, b: 0.56973785, a: 1} 40 | successColor: {r: 0.3066038, g: 1, b: 0.6434876, a: 1} 41 | failureColor: {r: 1, g: 0.4301899, b: 0.36320752, a: 1} 42 | abortedColor: {r: 0.17030083, g: 0.48223865, b: 0.8396226, a: 1} 43 | interruptedColor: {r: 1, g: 0.7523259, b: 0.042452812, a: 1} 44 | defaultConnectionColor: {r: 0.7607844, g: 0.7607844, b: 0.7607844, a: 1} 45 | defaultConnectionWidth: 4 46 | runningConnectionWidth: 6 47 | nodeSizePadding: {x: 12, y: 6} 48 | nodeWidthPadding: 12 49 | portHeight: 20 50 | portWidthTrim: 50 51 | iconSize: 32 52 | statusIconSize: 16 53 | -------------------------------------------------------------------------------- /Tests/Helper.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using Bonsai.Core; 5 | 6 | namespace Tests 7 | { 8 | public class TestNode : Task 9 | { 10 | public float? Utility { get; set; } = null; 11 | public Status ReturnStatus { get; set; } 12 | 13 | public const string kHistoryKey = "TraverseHistory"; 14 | 15 | public override void OnStart() 16 | { 17 | if (!Blackboard.Contains(kHistoryKey)) 18 | { 19 | Blackboard.Set(kHistoryKey, new List()); 20 | } 21 | } 22 | 23 | public override Status Run() 24 | { 25 | return ReturnStatus; 26 | } 27 | 28 | public override float UtilityValue() 29 | { 30 | return Utility.GetValueOrDefault(base.UtilityValue()); 31 | } 32 | 33 | public override void OnEnter() 34 | { 35 | Blackboard.Get>(kHistoryKey).Add(PreOrderIndex); 36 | } 37 | 38 | public TestNode WithUtility(float utility) 39 | { 40 | Utility = utility; 41 | return this; 42 | } 43 | } 44 | 45 | public static class Helper 46 | { 47 | public static void StartBehaviourTree(BehaviourTree tree) 48 | { 49 | tree.blackboard = ScriptableObject.CreateInstance(); 50 | tree.Start(); 51 | tree.BeginTraversal(); 52 | } 53 | 54 | public static BehaviourNode.Status StepBehaviourTree(BehaviourTree tree) 55 | { 56 | if (tree.IsRunning()) 57 | { 58 | tree.Update(); 59 | } 60 | 61 | return tree.LastStatus(); 62 | } 63 | 64 | public static BehaviourNode.Status RunBehaviourTree(BehaviourTree tree) 65 | { 66 | StartBehaviourTree(tree); 67 | while (tree.IsRunning()) 68 | { 69 | tree.Update(); 70 | } 71 | 72 | return tree.LastStatus(); 73 | } 74 | 75 | static public BehaviourTree CreateTree() 76 | { 77 | return ScriptableObject.CreateInstance(); 78 | } 79 | 80 | static public T CreateNode() where T : BehaviourNode 81 | { 82 | return ScriptableObject.CreateInstance(); 83 | } 84 | 85 | static public TestNode PassNode() 86 | { 87 | var node = CreateNode(); 88 | node.ReturnStatus = BehaviourNode.Status.Success; 89 | return node; 90 | } 91 | 92 | static public TestNode FailNode() 93 | { 94 | var node = CreateNode(); 95 | node.ReturnStatus = BehaviourNode.Status.Failure; 96 | return node; 97 | } 98 | } 99 | } 100 | 101 | -------------------------------------------------------------------------------- /Core/TreeQuery.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace Bonsai.Core 6 | { 7 | /// 8 | /// 9 | /// Traverses the tree in pre-order and provides common query operations on the traversed branch. 10 | /// 11 | /// 12 | /// The tree height is passed as the capacity for the traversal stack. 13 | /// To avoid GC allocations, make sure that the tree height passed matches the traversed branch height. 14 | /// 15 | /// 16 | public class TreeQuery 17 | { 18 | private readonly Stack traversal; 19 | 20 | public TreeQuery(int treeHeight) 21 | { 22 | // Since tree heights starts from zero, the stack needs to have treeHeight + 1 slots. 23 | traversal = new Stack(treeHeight + 1); 24 | } 25 | 26 | public BehaviourNode Next() 27 | { 28 | return PreOrderNext(); 29 | } 30 | 31 | private BehaviourNode PreOrderNext() 32 | { 33 | BehaviourNode current = traversal.Pop(); 34 | 35 | for (int i = current.ChildCount() - 1; i >= 0; --i) 36 | { 37 | BehaviourNode child = current.GetChildAt(i); 38 | traversal.Push(child); 39 | } 40 | 41 | return current; 42 | } 43 | 44 | /// 45 | /// Checks if there are still nodes to traverse. 46 | /// 47 | /// 48 | public bool HasNext() 49 | { 50 | return traversal.Count != 0; 51 | } 52 | 53 | /// 54 | /// Gets the maximum maximum for the traversed branch. 55 | /// 56 | /// 57 | /// 58 | /// int.MinValue is used because that is lowest possible pre order priority value. 59 | /// 60 | public float MaxUtility(BehaviourNode root, float initial = int.MinValue) 61 | { 62 | traversal.Push(root); 63 | 64 | while (HasNext()) 65 | { 66 | var node = Next(); 67 | initial = Math.Max(initial, node.UtilityValue()); 68 | } 69 | 70 | traversal.Clear(); 71 | return initial; 72 | } 73 | 74 | /// 75 | /// Sums the utility values of the traversed branch. 76 | /// 77 | /// 78 | /// 79 | /// 80 | public float SumUtility(BehaviourNode root, float initial = 0f) 81 | { 82 | traversal.Push(root); 83 | 84 | while (HasNext()) 85 | { 86 | var node = Next(); 87 | initial += node.UtilityValue(); 88 | } 89 | 90 | traversal.Clear(); 91 | return initial; 92 | } 93 | 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Editor/CanvasTransform.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace Bonsai.Designer 5 | { 6 | public struct CanvasTransform 7 | { 8 | /// 9 | /// The canvas offset (translation). 10 | /// 11 | public Vector2 pan; 12 | 13 | /// 14 | /// The canvas zoom scale. 15 | /// 16 | public float zoom; 17 | 18 | /// 19 | /// Width and height of the canvas. 20 | /// 21 | public Vector2 size; 22 | 23 | /// 24 | /// Tests if the a rect in canvas space is in view. 25 | /// 26 | /// The rect in canvas space. 27 | /// The result of the overlap test 28 | public bool InView(Rect rectInCanvasSpace) 29 | { 30 | var rectInScreenSpace = new Rect(CanvasToScreenSpace(rectInCanvasSpace.position), rectInCanvasSpace.size); 31 | var viewRect = new Rect(Vector2.zero, size * zoom); 32 | return viewRect.Overlaps(rectInScreenSpace); 33 | } 34 | 35 | /// 36 | /// Test if the line segment is in viewe of the window. 37 | /// Only works for axis aligned lines (horizontal or vertical). 38 | /// 39 | /// Start point of the line in screen space. 40 | /// End point of the line in screen space 41 | /// 42 | public bool IsScreenAxisLineInView(Vector2 start, Vector2 end) 43 | { 44 | var lineBox = new Rect { position = start, max = end }; 45 | Rect viewRect = new Rect(Vector2.zero, size * zoom); 46 | return viewRect.Overlaps(lineBox); 47 | } 48 | 49 | /// 50 | /// Converts the canvas position to screen space. 51 | /// This only works for geometry inside the ScaleUtility.BeginScale() 52 | /// 53 | /// 54 | /// 55 | public Vector2 CanvasToScreenSpace(Vector2 canvasPosition) 56 | { 57 | return (0.5f * size * zoom) + pan + canvasPosition; 58 | } 59 | 60 | /// 61 | /// Convertes the screen position to canvas space. 62 | /// 63 | public Vector2 ScreenToCanvasSpace(Vector2 screenPosition) 64 | { 65 | return (screenPosition - 0.5f * size) * zoom - pan; 66 | } 67 | 68 | /// 69 | /// Converts the canvas position to screen space. 70 | /// This works for geometry NOT inside the ScaleUtility.BeginScale(). 71 | /// 72 | /// 73 | //[Pure] 74 | //public void CanvasToScreenSpaceZoomAdj(ref Vector2 canvasPos) 75 | //{ 76 | // canvasPos = CanvasToScreenSpace(canvasPos) / canvas.ZoomScale; 77 | //} 78 | 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Standard/ConditionalAborts/IsValueOfType.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Text; 4 | using Bonsai.Core; 5 | using UnityEngine; 6 | 7 | namespace Bonsai.Standard 8 | { 9 | /// 10 | /// Tests if the value at the given key is a certain type. 11 | /// 12 | [BonsaiNode("Conditional/", "Condition")] 13 | public class IsValueOfType : ConditionalAbort, ISerializationCallbackReceiver 14 | { 15 | [Tooltip("The key of the value to test its type.")] 16 | public string key; 17 | 18 | /// 19 | /// The type to test against. 20 | /// 21 | public Type type; 22 | 23 | // Since Unity cannot serialize Type, we need to store the full name of the type. 24 | [SerializeField, HideInInspector] 25 | private string typename; 26 | 27 | private Action OnBlackboardChanged; 28 | 29 | public override void OnStart() 30 | { 31 | OnBlackboardChanged = delegate (Blackboard.KeyEvent e) 32 | { 33 | if (e.Key == key) 34 | { 35 | Evaluate(); 36 | } 37 | }; 38 | } 39 | 40 | public override bool Condition() 41 | { 42 | if (type == null || !Blackboard.Contains(key)) 43 | { 44 | return false; 45 | } 46 | 47 | object value = Blackboard.Get(key); 48 | 49 | // Value is unset, nothing to check. 50 | if (value == null) 51 | { 52 | return false; 53 | } 54 | 55 | return value.GetType() == type; 56 | } 57 | 58 | public void OnAfterDeserialize() 59 | { 60 | if (string.IsNullOrEmpty(typename)) 61 | { 62 | type = null; 63 | } 64 | 65 | else 66 | { 67 | type = Type.GetType(typename); 68 | } 69 | } 70 | 71 | public void OnBeforeSerialize() 72 | { 73 | if (type != null) 74 | { 75 | typename = type.AssemblyQualifiedName; 76 | } 77 | 78 | else 79 | { 80 | typename = ""; 81 | } 82 | } 83 | 84 | protected override void OnObserverBegin() 85 | { 86 | Blackboard.AddObserver(OnBlackboardChanged); 87 | } 88 | 89 | protected override void OnObserverEnd() 90 | { 91 | Blackboard.RemoveObserver(OnBlackboardChanged); 92 | } 93 | 94 | public override void Description(StringBuilder builder) 95 | { 96 | base.Description(builder); 97 | builder.AppendLine(); 98 | 99 | if (key == null || key.Length == 0) 100 | { 101 | builder.Append("No key is set to check"); 102 | } 103 | else 104 | { 105 | builder.AppendFormat("Blackboard key {0} is {1}", key, Utility.TypeExtensions.NiceName(type)); 106 | } 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /Editor/Resources/Arrow.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfe4296e32429c640864bf639de96621 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Cross.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8db2b847ab6b6434c9da1e0cf721fd8e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Grid.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ab4e605fe422164da65569c46a161d2 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 1 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 0 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 64 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 64 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Log.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dea510562c3e3d41a44a8c95cc7506b 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Play.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2835de4aab13b5469acae6cd953125d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Checkmark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39cfff267dd954642b26f231c7a997ad 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Condition.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a17e9f637aaccf94db3a879cf5eaa925 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Hourglass.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60f6d0e7913d4ab4ca5a8102c6e1c5f5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Parallel.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11c41aa554c99894db013714f5293de5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Priority.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 942d79521cc5d624e865f3b73074622d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 64 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 64 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Question.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3093748b9ff54a249aba8f1946a7febf 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Service.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39515b8750546864c80db242dc21f80b 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Shield.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cd1132a1fe5c794b836d95923da5458 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/DarkTexture.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfda76d4e735e7a47bcf756d5d90c44d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 0 38 | wrapV: 0 39 | wrapW: 0 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Exclamation.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec70c6a1f5d94054b9a17174816b507d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Gradient.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c453f51bbb9d4134d86679c771689df6 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 256 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 2 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 256 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 2 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Interruptable.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26691df30d822c740a158404719bcbcc 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Interruptor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25287e33bc9017240895a4cadcac7e53 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/PlainTexture.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c5508e99038cdf46bb29a177e477d6d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Reactive.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca34ed92af003d14cab088b41da5208b 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/RepeatArrow.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c8ee769b5f452b42a04ed86a5b5b19e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Shuffle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b361ed9d5034dca43ad9199e30a80bd3 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/SmallCross.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 397ee4348f410ce4b924621c621b4272 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/TreeIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c65bfd4093864464c80778897d67c5c7 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/ParallelSelector.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9435e4653ce84c74fae35072d92edc53 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/ShuffleQuestion.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72d2a4acb667bce4fb90170176e285e5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/SmallCheckmark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 823469dae6db1564ba120ca7221c51cf 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Editor/Resources/Timer.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04142ba59ca75264db265127ae80e774 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 2 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 1 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 5e97eb03825dee720800000000000000 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Core/Composite.cs: -------------------------------------------------------------------------------- 1 | 2 | using UnityEngine; 3 | 4 | namespace Bonsai.Core 5 | { 6 | /// 7 | /// The base class for all composite nodes. 8 | /// 9 | public abstract class Composite : BehaviourNode 10 | { 11 | [SerializeField, HideInInspector] 12 | private BehaviourNode[] children; 13 | 14 | protected Status lastChildExitStatus; 15 | public int CurrentChildIndex { get; private set; } = 0; 16 | 17 | public virtual BehaviourNode CurrentChild() 18 | { 19 | if (CurrentChildIndex < children.Length) 20 | { 21 | return children[CurrentChildIndex]; 22 | } 23 | 24 | return null; 25 | } 26 | 27 | /// 28 | /// Default behaviour is to immediately traverse the first child. 29 | /// 30 | public override void OnEnter() 31 | { 32 | CurrentChildIndex = 0; 33 | var next = CurrentChild(); 34 | if (next) 35 | { 36 | Iterator.Traverse(next); 37 | } 38 | } 39 | 40 | public BehaviourNode[] Children 41 | { 42 | get { return children; } 43 | } 44 | 45 | public sealed override int ChildCount() 46 | { 47 | return children.Length; 48 | } 49 | 50 | public sealed override BehaviourNode GetChildAt(int index) 51 | { 52 | return children[index]; 53 | } 54 | 55 | /// 56 | /// Set the children for the composite node. 57 | /// This should be called when the tree is being built. 58 | /// It should be called before Tree Start() and never during Tree Update() 59 | /// To clear children references, pass an empty array. 60 | /// 61 | /// The children for the node. Should not be null. 62 | public void SetChildren(BehaviourNode[] nodes) 63 | { 64 | children = nodes; 65 | // Set index orders. 66 | for (int i = 0; i < children.Length; i++) 67 | { 68 | children[i].indexOrder = i; 69 | } 70 | 71 | // Set parent references. 72 | foreach (BehaviourNode child in children) 73 | { 74 | child.Parent = this; 75 | } 76 | } 77 | 78 | /// 79 | /// Called when a composite node has a child that activates when it aborts. 80 | /// 81 | /// 82 | public override void OnAbort(int childIndex) 83 | { 84 | // The default behaviour is to set the current child index of the composite node. 85 | CurrentChildIndex = childIndex; 86 | } 87 | 88 | /// 89 | /// Default behaviour is sequential traversal from first to last. 90 | /// 91 | /// 92 | public override void OnChildExit(int childIndex, Status childStatus) 93 | { 94 | CurrentChildIndex++; 95 | lastChildExitStatus = childStatus; 96 | } 97 | 98 | public sealed override int MaxChildCount() 99 | { 100 | return int.MaxValue; 101 | } 102 | 103 | } 104 | } --------------------------------------------------------------------------------