├── .gitignore
├── Assets
├── BehaviourTree.meta
├── BehaviourTree
│ ├── BehaviourNode.cs
│ ├── BehaviourNode.cs.meta
│ ├── BehaviourTree.cs
│ ├── BehaviourTree.cs.meta
│ ├── BehaviourTreeBoard.cs
│ ├── BehaviourTreeBoard.cs.meta
│ ├── BehaviourTreeContext.cs
│ ├── BehaviourTreeContext.cs.meta
│ ├── BehaviourTreeTests.cs
│ ├── BehaviourTreeTests.cs.meta
│ ├── DecoratorNode.cs
│ ├── DecoratorNode.cs.meta
│ ├── Nodes.meta
│ ├── Nodes
│ │ ├── ComplexSequenceNode.cs
│ │ ├── ComplexSequenceNode.cs.meta
│ │ ├── FailureNode.cs
│ │ ├── FailureNode.cs.meta
│ │ ├── InvertorNode.cs
│ │ ├── InvertorNode.cs.meta
│ │ ├── SelectorNode.cs
│ │ ├── SelectorNode.cs.meta
│ │ ├── SequenceNode.cs
│ │ ├── SequenceNode.cs.meta
│ │ ├── SuccessNode.cs
│ │ ├── SuccessNode.cs.meta
│ │ ├── WaitForever.cs
│ │ ├── WaitForever.cs.meta
│ │ ├── WaitNode.cs
│ │ ├── WaitNode.cs.meta
│ │ ├── WaitUntil.cs
│ │ ├── WaitUntil.cs.meta
│ │ ├── WaitWhile.cs
│ │ └── WaitWhile.cs.meta
│ ├── ParentBehaviourNode.cs
│ └── ParentBehaviourNode.cs.meta
├── Scenes.meta
└── Scenes
│ ├── TestScene.unity
│ └── TestScene.unity.meta
├── LICENSE.md
├── Packages
└── manifest.json
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NetworkManager.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
└── UnityConnectSettings.asset
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | /[Ll]ibrary/
2 | /[Tt]emp/
3 | /[Oo]bj/
4 | /[Bb]uild/
5 | /[Bb]uilds/
6 | /Assets/AssetStoreTools*
7 | /Assets/Trash/
8 | /Assets/Trash.meta
9 |
10 | # Visual Studio 2015 cache directory
11 | /.vs/
12 |
13 | # Autogenerated VS/MD/Consulo solution and project files
14 | ExportedObj/
15 | .consulo/
16 | *.csproj
17 | *.unityproj
18 | *.sln
19 | *.suo
20 | *.tmp
21 | *.user
22 | *.userprefs
23 | *.pidb
24 | *.booproj
25 | *.svd
26 | *.pdb
27 |
28 | # Unity3D generated meta files
29 | *.pidb.meta
30 |
31 | # Unity3D Generated File On Crash Reports
32 | sysinfo.txt
33 |
34 | # Builds
35 | *.apk
36 | *.unitypackage
37 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 43b9fd9463a999347bbd1ae961f0d517
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourNode.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// The base class for any behaviour tree node
3 | ///
4 | /// The agent type
5 | public abstract class BehaviourNode {
6 |
7 | protected BehaviourTreeContext ctx;
8 |
9 | /// Called to inject the node with the agent information
10 | public void _Inject(BehaviourTreeContext ctx) {
11 | this.ctx = ctx;
12 | }
13 |
14 | /// Called when the node is entered
15 | public abstract State Start();
16 |
17 | /// Called every frame if the node part of the behaviour trees active "stack" of nodes
18 | public abstract State Update();
19 |
20 | /// Return true if the node should be restarted. !! Needs to be called on every frame by its parent and restart if necessary !!
21 | public virtual bool Recalculate() {
22 | return false;
23 | }
24 |
25 | public enum State {
26 | IN_PROGRESS,
27 | SUCCESS,
28 | FAILURE
29 | }
30 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6aef01a4814d8844e95d412574f2c6e1
3 | timeCreated: 1560376477
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTree.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Collections;
3 |
4 | using UnityEngine;
5 |
6 | ///
7 | /// The behaviour tree. Any AI class using the library needs to inherit this class
8 | ///
9 | /// The agent type
10 | public abstract class BehaviourTree {
11 |
12 | BehaviourNode currentNode;
13 |
14 | BehaviourTreeContext _ctx;
15 |
16 | MonoBehaviour _dependent;
17 | IEnumerator _routine;
18 |
19 | bool _started;
20 |
21 | ///
22 | /// Start the execution of the AI
23 | ///
24 | /// The behaviour the AI is attached to. The AI is disposed if the behaviour is destroyed
25 | /// The agent the AI is meant to control
26 | public void Start(MonoBehaviour dependent, X agent) {
27 | if (_started) return;
28 |
29 | _started = true;
30 |
31 | _dependent = dependent;
32 | _ctx = new BehaviourTreeContext(agent);
33 |
34 | Resume();
35 | }
36 |
37 | ///
38 | /// Pause the execution of the AI
39 | ///
40 | public void Pause() {
41 | if (_routine == null) return;
42 |
43 | _dependent.StopCoroutine(_routine);
44 | _routine = null;
45 | }
46 | ///
47 | /// Resume the execution of the AI if it was paused
48 | ///
49 | public void Resume() {
50 | if (_routine != null) return;
51 |
52 | _routine = Routine();
53 | _dependent.StartCoroutine(_routine);
54 | }
55 | ///
56 | /// Stop the execution of the AI and wipes every nodes currently being updated
57 | ///
58 | public void Stop() {
59 | Pause();
60 |
61 | currentNode = null;
62 | }
63 | ///
64 | /// Restarts the AI
65 | ///
66 | public void Restart() {
67 | Pause();
68 |
69 | currentNode = null;
70 |
71 | Resume();
72 | }
73 |
74 | ///
75 | /// Specify the root node of the tree
76 | ///
77 | protected abstract BehaviourNode GetRootNode();
78 |
79 | IEnumerator Routine() {
80 | while(true) {
81 | if (currentNode == null) {
82 | DefineNode();
83 | }
84 |
85 | if (currentNode != null) {
86 | var state = currentNode.Recalculate() ? currentNode.Start() : currentNode.Update();
87 |
88 | if (state != BehaviourNode.State.IN_PROGRESS) {
89 | currentNode = null;
90 | }
91 | }
92 |
93 | yield return null;
94 | }
95 | }
96 |
97 | void DefineNode() {
98 | currentNode = GetRootNode();
99 |
100 | currentNode._Inject(_ctx);
101 | var state = currentNode.Start();
102 |
103 | if (state != BehaviourNode.State.IN_PROGRESS) {
104 | currentNode = null;
105 | Debug.LogWarning("[BehaviourTree] Execution of the tree was instantaneous");
106 | }
107 | }
108 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTree.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6964d810cebdc4d4a910c9e916466282
3 | timeCreated: 1560376402
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTreeBoard.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Aka blackboard. It allows the storage and processing of information outside of nodes
3 | /// so they can remain stateless and share information easily (for example enemy positions, danger level, ...)
4 | ///
5 | /// The agent type
6 | public class BehaviourTreeBoard {
7 |
8 | protected BehaviourTreeContext ctx;
9 |
10 | /// Called to inject the board with the agent information
11 | public void _Inject(BehaviourTreeContext ctx) {
12 | this.ctx = ctx;
13 | }
14 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTreeBoard.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 15c4823a25bc29541a6923ef7156c9d1
3 | timeCreated: 1560376350
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTreeContext.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System;
3 |
4 | ///
5 | /// Shared to all nodes and boards, BehaviourTreeContext contains a reference to the agent and to all boards.
6 | ///
7 | /// The agent type
8 | public class BehaviourTreeContext {
9 |
10 | public X agent { get; private set; }
11 |
12 | Dictionary> _blackboard;
13 |
14 | public BehaviourTreeContext(X agent) {
15 | this.agent = agent;
16 |
17 | _blackboard = new Dictionary>();
18 | }
19 |
20 | ///
21 | /// Get a board for the AI, created if it is missing
22 | ///
23 | public Y GetBoard() where Y : BehaviourTreeBoard, new() {
24 | var type = typeof(Y);
25 |
26 | BehaviourTreeBoard board;
27 |
28 | if(!_blackboard.TryGetValue(type, out board)) {
29 | board = new Y();
30 | board._Inject(this);
31 |
32 | _blackboard[type] = board;
33 | }
34 |
35 | return board as Y;
36 | }
37 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTreeContext.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91230cdc295440d4885fda7102ea2948
3 | timeCreated: 1560376290
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTreeTests.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 |
4 | public class BehaviourTreeTests : MonoBehaviour {
5 |
6 | List> _nodesToTest;
7 | int _idx = -1;
8 |
9 | BehaviourTree _currentTree;
10 |
11 | void Start() {
12 | _nodesToTest = new List> {
13 | new TestWaitNode(),
14 | new TestInvertorNode(),
15 | new TestSuccessNode(),
16 | new TestFailureNode(),
17 | new TestBoardNode(),
18 | new TestSequenceNode1(),
19 | new TestSequenceNode2(),
20 | //new TestFail()
21 | };
22 |
23 | RunNext();
24 | }
25 |
26 | public void Success() {
27 | Debug.Log("Test " + _nodesToTest[_idx].GetType().Name + " succeeded");
28 |
29 | RunNext();
30 | }
31 | public void Failure() {
32 | Debug.Log("Test " + _nodesToTest[_idx].GetType().Name + " failed");
33 |
34 | RunNext();
35 | }
36 |
37 | void RunNext() {
38 | _idx++;
39 | if(_idx >= _nodesToTest.Count) {
40 | Debug.Log("All " + _nodesToTest.Count + " tests are done");
41 |
42 | _currentTree.Stop();
43 | return;
44 | }
45 |
46 | var node = _nodesToTest[_idx];
47 |
48 | if (_currentTree != null) _currentTree.Stop();
49 |
50 | _currentTree = new TestTree(node);
51 | _currentTree.Start(this, this);
52 | }
53 |
54 | class TestTree : BehaviourTree {
55 |
56 | BehaviourNode _node;
57 |
58 | public TestTree(BehaviourNode node) {
59 | _node = node;
60 | }
61 |
62 | protected override BehaviourNode GetRootNode() {
63 | return _node;
64 | }
65 | }
66 |
67 | class TestWaitNode : ComplexSequenceNode {
68 |
69 | public override bool Recalculate() {
70 | return false;
71 | }
72 |
73 | public override IEnumerable> GetChilds() {
74 | var time = Time.time;
75 | yield return new WaitNode(1);
76 |
77 | if (Time.time - time > 0.99f) {
78 | ctx.agent.Success();
79 | } else {
80 | ctx.agent.Failure();
81 | }
82 | }
83 | }
84 | class TestInvertorNode : ComplexSequenceNode {
85 |
86 | public static int count;
87 |
88 | public override bool Recalculate() {
89 | return false;
90 | }
91 |
92 | public override IEnumerable> GetChilds() {
93 | count++;
94 |
95 | if (count > 1) ctx.agent.Failure();
96 |
97 | yield return new InvertorNode(new HelperConstantNode(State.FAILURE));
98 |
99 | ctx.agent.Success();
100 | }
101 | }
102 | class TestFailureNode : ComplexSequenceNode {
103 |
104 | public static int count;
105 |
106 | public override bool Recalculate() {
107 | return false;
108 | }
109 |
110 | public override IEnumerable> GetChilds() {
111 | count++;
112 |
113 | if(count > 1) ctx.agent.Failure();
114 |
115 | yield return new InvertorNode(new FailureNode(new HelperConstantNode(State.SUCCESS)));
116 |
117 | ctx.agent.Success();
118 | }
119 | }
120 | class TestSuccessNode : ComplexSequenceNode {
121 |
122 | public static int count;
123 |
124 | public override bool Recalculate() {
125 | return false;
126 | }
127 |
128 | public override IEnumerable> GetChilds() {
129 | count++;
130 |
131 | if (count > 1) ctx.agent.Failure();
132 |
133 | yield return new SuccessNode(new HelperConstantNode(State.FAILURE));
134 |
135 | ctx.agent.Success();
136 | }
137 | }
138 | class TestBoardNode : ComplexSequenceNode {
139 |
140 | public override bool Recalculate() {
141 | return false;
142 | }
143 |
144 | public override IEnumerable> GetChilds() {
145 | const int COUNT = 3;
146 |
147 | for (int i = 0; i < COUNT; i++) {
148 | yield return new IncrementNode();
149 | }
150 |
151 | if(COUNT == ctx.GetBoard().count) {
152 | ctx.agent.Success();
153 | } else {
154 | ctx.agent.Failure();
155 | }
156 | }
157 | }
158 | class TestSequenceNode1 : ComplexSequenceNode {
159 |
160 | public override bool Recalculate() {
161 | return false;
162 | }
163 |
164 | public override IEnumerable> GetChilds() {
165 | yield return new SequenceNode(
166 | new IncrementNode(),
167 | new IncrementNode(),
168 | new IncrementNode(),
169 | new IncrementNode()
170 | );
171 |
172 | if(ctx.GetBoard().count == 4) {
173 | ctx.agent.Success();
174 | } else {
175 | ctx.agent.Failure();
176 | }
177 | }
178 | }
179 | class TestSequenceNode2 : ComplexSequenceNode {
180 |
181 | static int count;
182 |
183 | public override IEnumerable> GetChilds() {
184 | count++;
185 |
186 | if(count > 1) ctx.agent.Success();
187 |
188 | yield return new SequenceNode(
189 | new IncrementNode(),
190 | new IncrementNode(),
191 | new HelperConstantNode(State.FAILURE),
192 | new IncrementNode()
193 | );
194 |
195 | ctx.agent.Failure();
196 | }
197 | }
198 | class TestFail : ComplexSequenceNode {
199 |
200 | public override IEnumerable> GetChilds() {
201 | ctx.agent.Failure();
202 |
203 | yield break;
204 | }
205 | }
206 |
207 | class IncrementNode : BehaviourNode {
208 |
209 | public override bool Recalculate() {
210 | return false;
211 | }
212 |
213 | public override State Start() {
214 | return State.IN_PROGRESS;
215 | }
216 |
217 | public override State Update() {
218 | var board = ctx.GetBoard();
219 |
220 | board.count++;
221 |
222 | return State.SUCCESS;
223 | }
224 | }
225 |
226 | class Board : BehaviourTreeBoard {
227 |
228 | public int count;
229 | }
230 |
231 | class HelperConstantNode : BehaviourNode {
232 |
233 | State _state;
234 |
235 | public HelperConstantNode(State state) {
236 | _state = state;
237 | }
238 |
239 | public override bool Recalculate() {
240 | return false;
241 | }
242 |
243 | public override State Start() {
244 | return State.IN_PROGRESS;
245 | }
246 |
247 | public override State Update() {
248 | return _state;
249 | }
250 | }
251 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/BehaviourTreeTests.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a186d042f1ecd094d92aba648c538a65
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/DecoratorNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | ///
4 | /// Parent to a single node, a DecoratorNode processes the result from its child and chooses what it decides to send up
5 | ///
6 | /// The agent type
7 | public abstract class DecoratorNode : ParentBehaviourNode {
8 |
9 | BehaviourNode _child;
10 |
11 | public DecoratorNode(BehaviourNode child) {
12 | _child = child;
13 | }
14 |
15 | public override bool Recalculate() {
16 | return false;
17 | }
18 |
19 | public override IEnumerable> GetChilds() {
20 | yield return _child;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/DecoratorNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: feb77d2d744122e4b831e915e5cf3869
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73c2ed2f2e563864fa9dc2c32accb949
3 | folderAsset: yes
4 | timeCreated: 1560376500
5 | licenseType: Free
6 | DefaultImporter:
7 | externalObjects: {}
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/ComplexSequenceNode.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Inherit to implement a dynamically defined sequence using the C# IEnumerable function syntax.
3 | ///
4 | /// The agent type
5 | public abstract class ComplexSequenceNode : ParentBehaviourNode {
6 |
7 | public override State CalculateState(State childState) {
8 | return childState;
9 | }
10 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/ComplexSequenceNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74bd87b56ad7c4441b9a8010d2771fd6
3 | timeCreated: 1560376518
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/FailureNode.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Decorator that always returns FAILURE, regardless of the children result
3 | ///
4 | /// The agent type
5 | public class FailureNode : DecoratorNode {
6 |
7 | public FailureNode(BehaviourNode child) : base(child) { }
8 |
9 | public override State CalculateState(State childState) {
10 | return State.FAILURE;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/FailureNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53846b9b4ad11cc4188dbce8f1794e83
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/InvertorNode.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Decorator that inverts the childs result (SUCCESS if the child returns a FAILURE, FAILURE if the child returns a SUCCESS)
3 | ///
4 | /// The agent type
5 | public class InvertorNode : DecoratorNode {
6 |
7 | public InvertorNode(BehaviourNode child) : base(child) { }
8 |
9 | public override State CalculateState(State childState) {
10 | return childState == State.SUCCESS ? State.FAILURE : State.SUCCESS;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/InvertorNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9707944e3e1f8844faf566417edc6cc0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/SelectorNode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// Contains a node and a predicate that determines whether the node should be excuted or not
5 | ///
6 | /// the agent type
7 | public class Selection {
8 |
9 | public Func, bool> shouldPick;
10 | public BehaviourNode node;
11 |
12 | public Selection(Func, bool> shouldPick, BehaviourNode node) {
13 | this.shouldPick = shouldPick;
14 | this.node = node;
15 | }
16 | }
17 |
18 | ///
19 | /// Node that selects between several possible nodes based on predicates provided for each of them.
20 | /// The selector checks every node until one of them should be picked, if none can be picked, returns SUCCESS
21 | ///
22 | /// The agent type
23 | public class SelectorNode : BehaviourNode {
24 |
25 | Selection[] _childs;
26 |
27 | BehaviourNode _currentNode;
28 |
29 | public SelectorNode(params Selection[] childs) {
30 | _childs = childs;
31 | }
32 |
33 | public override State Start() {
34 | return DefineNode();
35 | }
36 |
37 | public override State Update() {
38 | return _currentNode.Recalculate() ? _currentNode.Start() : _currentNode.Update();
39 | }
40 |
41 | public override bool Recalculate() {
42 | foreach(var s in _childs) {
43 | var pick = s.shouldPick(ctx);
44 | var current = s.node == _currentNode;
45 |
46 | if(pick) {
47 | if(current) {
48 | return false;
49 | } else {
50 | return true;
51 | }
52 | }
53 | }
54 |
55 | return false;
56 | }
57 |
58 | State DefineNode() {
59 | foreach (var s in _childs) {
60 | var pick = s.shouldPick(ctx);
61 |
62 | if (pick) {
63 | _currentNode = s.node;
64 | _currentNode._Inject(ctx);
65 |
66 | var state = _currentNode.Start();
67 |
68 | return state;
69 | }
70 | }
71 |
72 | return State.SUCCESS;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/SelectorNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d0be3f411260c24ea1fc55b8f4f0352
3 | timeCreated: 1560602658
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/SequenceNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | ///
4 | /// A simple sequence of nodes: provide a list of nodes and they will be executed in a sequence. If on of them returns a FAILURE, the node will return a FAILURE.
5 | /// Otherwise, at the end of the sequence, returns a SUCCESS
6 | ///
7 | /// The agent type
8 | public class SequenceNode : ParentBehaviourNode {
9 |
10 | BehaviourNode[] _childs;
11 |
12 | public SequenceNode(params BehaviourNode[] childs) {
13 | _childs = childs;
14 | }
15 |
16 | public override bool Recalculate() {
17 | return false;
18 | }
19 |
20 | public override IEnumerable> GetChilds() {
21 | return _childs;
22 | }
23 |
24 | public override State CalculateState(State childState) {
25 | return childState;
26 | }
27 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/SequenceNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9bd579629a6127b4cbb25417a9548a6e
3 | timeCreated: 1560376509
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/SuccessNode.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Decorator that always returns SUCCESS, regardless of the children result
3 | ///
4 | /// The agent type
5 | public class SuccessNode : DecoratorNode {
6 |
7 | public SuccessNode(BehaviourNode child) : base(child) { }
8 |
9 | public override State CalculateState(State childState) {
10 | return State.SUCCESS;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/SuccessNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5014cc13e1f614642afa9ae5e963ecaa
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitForever.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Pause forever
3 | ///
4 | /// The agent type
5 | public class WaitForever : WaitNode {
6 |
7 | public WaitForever() : base(100000000000) { }
8 | }
9 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitForever.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0119d2f7ae178d747834fb1ba41630e4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | ///
4 | /// Pause for a certain duration (time based on UnityEngine.Time.time)
5 | ///
6 | /// The agent type
7 | public class WaitNode : BehaviourNode {
8 |
9 | float _duration;
10 |
11 | float _endAtTime;
12 |
13 | public WaitNode(float duration) {
14 | _duration = duration;
15 | }
16 |
17 | public override State Start() {
18 | _endAtTime = Time.time + _duration;
19 |
20 | return State.IN_PROGRESS;
21 | }
22 |
23 | public override State Update() {
24 | return Time.time > _endAtTime ? State.SUCCESS : State.IN_PROGRESS;
25 | }
26 |
27 | public override bool Recalculate() {
28 | return false;
29 | }
30 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 97c6087ec9cf4684581647f2646647e3
3 | timeCreated: 1560555702
4 | licenseType: Free
5 | MonoImporter:
6 | externalObjects: {}
7 | serializedVersion: 2
8 | defaultReferences: []
9 | executionOrder: 0
10 | icon: {instanceID: 0}
11 | userData:
12 | assetBundleName:
13 | assetBundleVariant:
14 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitUntil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// Wait until a certain condition is met
5 | ///
6 | /// The agent type
7 | public class WaitUntil : BehaviourNode {
8 |
9 | Func, bool> _endCondition;
10 |
11 | public WaitUntil(Func, bool> endCondition) {
12 | _endCondition = endCondition;
13 | }
14 |
15 | public override State Start() {
16 | return _endCondition(ctx) ? State.SUCCESS : State.IN_PROGRESS;
17 | }
18 |
19 | public override State Update() {
20 | return _endCondition(ctx) ? State.SUCCESS : State.IN_PROGRESS;
21 | }
22 |
23 | public override bool Recalculate() {
24 | return false;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitUntil.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 401d14d5fde61f547b54abddbdcfa766
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitWhile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// Wait until a certain condition is met
5 | ///
6 | /// The agent type
7 | public class WaitWhile : BehaviourNode {
8 |
9 | Func, bool> _condition;
10 |
11 | public WaitWhile(Func, bool> condition) {
12 | _condition = condition;
13 | }
14 |
15 | public override State Start() {
16 | return _condition(ctx) ? State.IN_PROGRESS : State.SUCCESS;
17 | }
18 |
19 | public override State Update() {
20 | return _condition(ctx) ? State.IN_PROGRESS : State.SUCCESS;
21 | }
22 |
23 | public override bool Recalculate() {
24 | return false;
25 | }
26 | }
--------------------------------------------------------------------------------
/Assets/BehaviourTree/Nodes/WaitWhile.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe0dbc788e13ec04399b3552e3b3dd86
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/ParentBehaviourNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | ///
4 | /// Offer a simple implementation for multi-child composite nodes. When you inherit it, you just need to implement the
5 | /// function that defines the composite childs. The nodes get executed until one of them fails. If they all execute,
6 | /// the node sends a SUCCESS, otherwise it sends a FAIURE
7 | ///
8 | /// The agent type
9 | public abstract class ParentBehaviourNode : BehaviourNode {
10 |
11 | IEnumerator> _childs;
12 | BehaviourNode _current;
13 |
14 | public override State Start() {
15 | _childs = GetChilds().GetEnumerator();
16 |
17 | return ToNextNode();
18 | }
19 |
20 | public override State Update() {
21 | var state = _current.Recalculate() ? _current.Start() : _current.Update();
22 |
23 | if (state == State.FAILURE) {
24 | return CalculateState(State.FAILURE);
25 | } else if (state == State.SUCCESS) {
26 | return ToNextNode();
27 | } else {
28 | return State.IN_PROGRESS;
29 | }
30 | }
31 |
32 | State ToNextNode() {
33 | while (_childs.MoveNext()) {
34 | _current = _childs.Current;
35 |
36 | _current._Inject(ctx);
37 | var state = _current.Start();
38 |
39 | if (state == State.FAILURE) {
40 | return CalculateState(State.FAILURE);
41 | } else if (state == State.IN_PROGRESS) {
42 | return State.IN_PROGRESS;
43 | }
44 | }
45 |
46 | return CalculateState(State.SUCCESS);
47 | }
48 |
49 | ///
50 | /// Get the children for this node
51 | ///
52 | public abstract IEnumerable> GetChilds();
53 |
54 | ///
55 | /// Defines what state to send up based on the result provided by the children (SUCCESS if all the children succeeded, FAILURE otherwise)
56 | ///
57 | public abstract State CalculateState(State childState);
58 | }
59 |
--------------------------------------------------------------------------------
/Assets/BehaviourTree/ParentBehaviourNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4867f2185e616834a96730fb393a01dc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 131a6b21c8605f84396be9f6751fb6e3
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/TestScene.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 3
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_TemporalCoherenceThreshold: 1
54 | m_EnvironmentLightingMode: 0
55 | m_EnableBakedLightmaps: 0
56 | m_EnableRealtimeLightmaps: 0
57 | m_LightmapEditorSettings:
58 | serializedVersion: 10
59 | m_Resolution: 2
60 | m_BakeResolution: 40
61 | m_AtlasSize: 1024
62 | m_AO: 0
63 | m_AOMaxDistance: 1
64 | m_CompAOExponent: 1
65 | m_CompAOExponentDirect: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 0
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVRFilterTypeDirect: 0
81 | m_PVRFilterTypeIndirect: 0
82 | m_PVRFilterTypeAO: 0
83 | m_PVRFilteringMode: 1
84 | m_PVRCulling: 1
85 | m_PVRFilteringGaussRadiusDirect: 1
86 | m_PVRFilteringGaussRadiusIndirect: 5
87 | m_PVRFilteringGaussRadiusAO: 2
88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
90 | m_PVRFilteringAtrousPositionSigmaAO: 1
91 | m_ShowResolutionOverlay: 1
92 | m_LightingDataAsset: {fileID: 0}
93 | m_UseShadowmask: 1
94 | --- !u!196 &4
95 | NavMeshSettings:
96 | serializedVersion: 2
97 | m_ObjectHideFlags: 0
98 | m_BuildSettings:
99 | serializedVersion: 2
100 | agentTypeID: 0
101 | agentRadius: 0.5
102 | agentHeight: 2
103 | agentSlope: 45
104 | agentClimb: 0.4
105 | ledgeDropHeight: 0
106 | maxJumpAcrossDistance: 0
107 | minRegionArea: 2
108 | manualCellSize: 0
109 | cellSize: 0.16666667
110 | manualTileSize: 0
111 | tileSize: 256
112 | accuratePlacement: 0
113 | debug:
114 | m_Flags: 0
115 | m_NavMeshData: {fileID: 0}
116 | --- !u!1 &519420028
117 | GameObject:
118 | m_ObjectHideFlags: 0
119 | m_CorrespondingSourceObject: {fileID: 0}
120 | m_PrefabInternal: {fileID: 0}
121 | serializedVersion: 6
122 | m_Component:
123 | - component: {fileID: 519420032}
124 | - component: {fileID: 519420031}
125 | - component: {fileID: 519420029}
126 | m_Layer: 0
127 | m_Name: Main Camera
128 | m_TagString: MainCamera
129 | m_Icon: {fileID: 0}
130 | m_NavMeshLayer: 0
131 | m_StaticEditorFlags: 0
132 | m_IsActive: 1
133 | --- !u!81 &519420029
134 | AudioListener:
135 | m_ObjectHideFlags: 0
136 | m_CorrespondingSourceObject: {fileID: 0}
137 | m_PrefabInternal: {fileID: 0}
138 | m_GameObject: {fileID: 519420028}
139 | m_Enabled: 1
140 | --- !u!20 &519420031
141 | Camera:
142 | m_ObjectHideFlags: 0
143 | m_CorrespondingSourceObject: {fileID: 0}
144 | m_PrefabInternal: {fileID: 0}
145 | m_GameObject: {fileID: 519420028}
146 | m_Enabled: 1
147 | serializedVersion: 2
148 | m_ClearFlags: 2
149 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
150 | m_projectionMatrixMode: 1
151 | m_SensorSize: {x: 36, y: 24}
152 | m_LensShift: {x: 0, y: 0}
153 | m_FocalLength: 50
154 | m_NormalizedViewPortRect:
155 | serializedVersion: 2
156 | x: 0
157 | y: 0
158 | width: 1
159 | height: 1
160 | near clip plane: 0.3
161 | far clip plane: 1000
162 | field of view: 60
163 | orthographic: 1
164 | orthographic size: 5
165 | m_Depth: -1
166 | m_CullingMask:
167 | serializedVersion: 2
168 | m_Bits: 4294967295
169 | m_RenderingPath: -1
170 | m_TargetTexture: {fileID: 0}
171 | m_TargetDisplay: 0
172 | m_TargetEye: 0
173 | m_HDR: 1
174 | m_AllowMSAA: 0
175 | m_AllowDynamicResolution: 0
176 | m_ForceIntoRT: 0
177 | m_OcclusionCulling: 0
178 | m_StereoConvergence: 10
179 | m_StereoSeparation: 0.022
180 | --- !u!4 &519420032
181 | Transform:
182 | m_ObjectHideFlags: 0
183 | m_CorrespondingSourceObject: {fileID: 0}
184 | m_PrefabInternal: {fileID: 0}
185 | m_GameObject: {fileID: 519420028}
186 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
187 | m_LocalPosition: {x: 0, y: 0, z: -10}
188 | m_LocalScale: {x: 1, y: 1, z: 1}
189 | m_Children: []
190 | m_Father: {fileID: 0}
191 | m_RootOrder: 0
192 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
193 | --- !u!1 &1249747524
194 | GameObject:
195 | m_ObjectHideFlags: 0
196 | m_CorrespondingSourceObject: {fileID: 0}
197 | m_PrefabInternal: {fileID: 0}
198 | serializedVersion: 6
199 | m_Component:
200 | - component: {fileID: 1249747526}
201 | - component: {fileID: 1249747525}
202 | m_Layer: 0
203 | m_Name: GameObject
204 | m_TagString: Untagged
205 | m_Icon: {fileID: 0}
206 | m_NavMeshLayer: 0
207 | m_StaticEditorFlags: 0
208 | m_IsActive: 1
209 | --- !u!114 &1249747525
210 | MonoBehaviour:
211 | m_ObjectHideFlags: 0
212 | m_CorrespondingSourceObject: {fileID: 0}
213 | m_PrefabInternal: {fileID: 0}
214 | m_GameObject: {fileID: 1249747524}
215 | m_Enabled: 1
216 | m_EditorHideFlags: 0
217 | m_Script: {fileID: 11500000, guid: a186d042f1ecd094d92aba648c538a65, type: 3}
218 | m_Name:
219 | m_EditorClassIdentifier:
220 | --- !u!4 &1249747526
221 | Transform:
222 | m_ObjectHideFlags: 0
223 | m_CorrespondingSourceObject: {fileID: 0}
224 | m_PrefabInternal: {fileID: 0}
225 | m_GameObject: {fileID: 1249747524}
226 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
227 | m_LocalPosition: {x: 0, y: 0, z: 0}
228 | m_LocalScale: {x: 1, y: 1, z: 1}
229 | m_Children: []
230 | m_Father: {fileID: 0}
231 | m_RootOrder: 1
232 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
233 |
--------------------------------------------------------------------------------
/Assets/Scenes/TestScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2cda990e2423bbf4892e6590ba056729
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Emerick Gibson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ads": "2.0.8",
4 | "com.unity.analytics": "2.0.16",
5 | "com.unity.package-manager-ui": "1.9.11",
6 | "com.unity.purchasing": "2.0.3",
7 | "com.unity.textmeshpro": "1.2.4",
8 | "com.unity.modules.ai": "1.0.0",
9 | "com.unity.modules.animation": "1.0.0",
10 | "com.unity.modules.assetbundle": "1.0.0",
11 | "com.unity.modules.audio": "1.0.0",
12 | "com.unity.modules.cloth": "1.0.0",
13 | "com.unity.modules.director": "1.0.0",
14 | "com.unity.modules.imageconversion": "1.0.0",
15 | "com.unity.modules.imgui": "1.0.0",
16 | "com.unity.modules.jsonserialize": "1.0.0",
17 | "com.unity.modules.particlesystem": "1.0.0",
18 | "com.unity.modules.physics": "1.0.0",
19 | "com.unity.modules.physics2d": "1.0.0",
20 | "com.unity.modules.screencapture": "1.0.0",
21 | "com.unity.modules.terrain": "1.0.0",
22 | "com.unity.modules.terrainphysics": "1.0.0",
23 | "com.unity.modules.tilemap": "1.0.0",
24 | "com.unity.modules.ui": "1.0.0",
25 | "com.unity.modules.uielements": "1.0.0",
26 | "com.unity.modules.umbra": "1.0.0",
27 | "com.unity.modules.unityanalytics": "1.0.0",
28 | "com.unity.modules.unitywebrequest": "1.0.0",
29 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
30 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
31 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
32 | "com.unity.modules.unitywebrequestwww": "1.0.0",
33 | "com.unity.modules.vehicles": "1.0.0",
34 | "com.unity.modules.video": "1.0.0",
35 | "com.unity.modules.vr": "1.0.0",
36 | "com.unity.modules.wind": "1.0.0",
37 | "com.unity.modules.xr": "1.0.0"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 1024
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 7
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 1
23 | m_ClothInterCollisionSettingsToggle: 0
24 | m_ContactPairsMode: 0
25 | m_BroadphaseType: 0
26 | m_WorldBounds:
27 | m_Center: {x: 0, y: 0, z: 0}
28 | m_Extent: {x: 250, y: 250, z: 250}
29 | m_WorldSubdivisions: 8
30 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/SampleScene.unity
10 | guid: 2cda990e2423bbf4892e6590ba056729
11 | m_configObjects: {}
12 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 7
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 1
11 | m_SpritePackerMode: 4
12 | m_SpritePackerPaddingPower: 1
13 | m_EtcTextureCompressorBehavior: 1
14 | m_EtcTextureFastCompressor: 1
15 | m_EtcTextureNormalCompressor: 2
16 | m_EtcTextureBestCompressor: 4
17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
18 | m_ProjectGenerationRootNamespace:
19 | m_UserGeneratedProjectSuffix:
20 | m_CollabEditorSettings:
21 | inProgressEnabled: 1
22 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
35 | m_PreloadedShaders: []
36 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
37 | type: 0}
38 | m_CustomRenderPipeline: {fileID: 0}
39 | m_TransparencySortMode: 0
40 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
41 | m_DefaultRenderingPath: 1
42 | m_DefaultMobileRenderingPath: 1
43 | m_TierSettings: []
44 | m_LightmapStripping: 0
45 | m_FogStripping: 0
46 | m_InstancingStripping: 0
47 | m_LightmapKeepPlain: 1
48 | m_LightmapKeepDirCombined: 1
49 | m_LightmapKeepDynamicPlain: 1
50 | m_LightmapKeepDynamicDirCombined: 1
51 | m_LightmapKeepShadowMask: 1
52 | m_LightmapKeepSubtractive: 1
53 | m_FogKeepLinear: 1
54 | m_FogKeepExp: 1
55 | m_FogKeepExp2: 1
56 | m_AlbedoSwatchInfos: []
57 | m_LightsUseLinearIntensity: 0
58 | m_LightsUseColorTemperature: 0
59 |
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!149 &1
4 | NetworkManager:
5 | m_ObjectHideFlags: 0
6 | m_DebugLevel: 0
7 | m_Sendrate: 15
8 | m_AssetToPrefab: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_AutoSyncTransforms: 1
46 | m_AlwaysShowColliders: 0
47 | m_ShowColliderSleep: 1
48 | m_ShowColliderContacts: 0
49 | m_ShowColliderAABB: 0
50 | m_ContactArrowScale: 0.2
51 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
52 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
53 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
54 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
55 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
56 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList:
7 | - type:
8 | m_NativeTypeID: 20
9 | m_ManagedTypePPtr: {fileID: 0}
10 | m_ManagedTypeFallback:
11 | defaultPresets:
12 | - m_Preset: {fileID: 2655988077585873504, guid: bfcfc320427f8224bbb7a96f3d3aebad,
13 | type: 2}
14 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 15
7 | productGUID: d2708b1abc81d5a4e8d6f1763a69e9e4
8 | AndroidProfiler: 0
9 | AndroidFilterTouchesWhenObscured: 0
10 | AndroidEnableSustainedPerformanceMode: 0
11 | defaultScreenOrientation: 4
12 | targetDevice: 2
13 | useOnDemandResources: 0
14 | accelerometerFrequency: 60
15 | companyName: DefaultCompany
16 | productName: behaviour-tree
17 | defaultCursor: {fileID: 0}
18 | cursorHotspot: {x: 0, y: 0}
19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
20 | m_ShowUnitySplashScreen: 1
21 | m_ShowUnitySplashLogo: 1
22 | m_SplashScreenOverlayOpacity: 1
23 | m_SplashScreenAnimation: 1
24 | m_SplashScreenLogoStyle: 1
25 | m_SplashScreenDrawMode: 0
26 | m_SplashScreenBackgroundAnimationZoom: 1
27 | m_SplashScreenLogoAnimationZoom: 1
28 | m_SplashScreenBackgroundLandscapeAspect: 1
29 | m_SplashScreenBackgroundPortraitAspect: 1
30 | m_SplashScreenBackgroundLandscapeUvs:
31 | serializedVersion: 2
32 | x: 0
33 | y: 0
34 | width: 1
35 | height: 1
36 | m_SplashScreenBackgroundPortraitUvs:
37 | serializedVersion: 2
38 | x: 0
39 | y: 0
40 | width: 1
41 | height: 1
42 | m_SplashScreenLogos: []
43 | m_VirtualRealitySplashScreen: {fileID: 0}
44 | m_HolographicTrackingLossScreen: {fileID: 0}
45 | defaultScreenWidth: 1024
46 | defaultScreenHeight: 768
47 | defaultScreenWidthWeb: 960
48 | defaultScreenHeightWeb: 600
49 | m_StereoRenderingPath: 0
50 | m_ActiveColorSpace: 0
51 | m_MTRendering: 1
52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000
53 | iosShowActivityIndicatorOnLoading: -1
54 | androidShowActivityIndicatorOnLoading: -1
55 | iosAppInBackgroundBehavior: 0
56 | displayResolutionDialog: 1
57 | iosAllowHTTPDownload: 1
58 | allowedAutorotateToPortrait: 1
59 | allowedAutorotateToPortraitUpsideDown: 1
60 | allowedAutorotateToLandscapeRight: 1
61 | allowedAutorotateToLandscapeLeft: 1
62 | useOSAutorotation: 1
63 | use32BitDisplayBuffer: 1
64 | preserveFramebufferAlpha: 0
65 | disableDepthAndStencilBuffers: 0
66 | androidBlitType: 0
67 | defaultIsNativeResolution: 1
68 | macRetinaSupport: 1
69 | runInBackground: 1
70 | captureSingleScreen: 0
71 | muteOtherAudioSources: 0
72 | Prepare IOS For Recording: 0
73 | Force IOS Speakers When Recording: 0
74 | deferSystemGesturesMode: 0
75 | hideHomeButton: 0
76 | submitAnalytics: 1
77 | usePlayerLog: 1
78 | bakeCollisionMeshes: 0
79 | forceSingleInstance: 0
80 | resizableWindow: 0
81 | useMacAppStoreValidation: 0
82 | macAppStoreCategory: public.app-category.games
83 | gpuSkinning: 0
84 | graphicsJobs: 0
85 | xboxPIXTextureCapture: 0
86 | xboxEnableAvatar: 0
87 | xboxEnableKinect: 0
88 | xboxEnableKinectAutoTracking: 0
89 | xboxEnableFitness: 0
90 | visibleInBackground: 1
91 | allowFullscreenSwitch: 1
92 | graphicsJobMode: 0
93 | fullscreenMode: 1
94 | xboxSpeechDB: 0
95 | xboxEnableHeadOrientation: 0
96 | xboxEnableGuest: 0
97 | xboxEnablePIXSampling: 0
98 | metalFramebufferOnly: 0
99 | n3dsDisableStereoscopicView: 0
100 | n3dsEnableSharedListOpt: 1
101 | n3dsEnableVSync: 0
102 | xboxOneResolution: 0
103 | xboxOneSResolution: 0
104 | xboxOneXResolution: 3
105 | xboxOneMonoLoggingLevel: 0
106 | xboxOneLoggingLevel: 1
107 | xboxOneDisableEsram: 0
108 | xboxOnePresentImmediateThreshold: 0
109 | switchQueueCommandMemory: 0
110 | videoMemoryForVertexBuffers: 0
111 | psp2PowerMode: 0
112 | psp2AcquireBGM: 1
113 | vulkanEnableSetSRGBWrite: 0
114 | vulkanUseSWCommandBuffers: 0
115 | m_SupportedAspectRatios:
116 | 4:3: 1
117 | 5:4: 1
118 | 16:10: 1
119 | 16:9: 1
120 | Others: 1
121 | bundleVersion: 0.1
122 | preloadedAssets: []
123 | metroInputSource: 0
124 | wsaTransparentSwapchain: 0
125 | m_HolographicPauseOnTrackingLoss: 1
126 | xboxOneDisableKinectGpuReservation: 0
127 | xboxOneEnable7thCore: 0
128 | isWsaHolographicRemotingEnabled: 0
129 | vrSettings:
130 | cardboard:
131 | depthFormat: 0
132 | enableTransitionView: 0
133 | daydream:
134 | depthFormat: 0
135 | useSustainedPerformanceMode: 0
136 | enableVideoLayer: 0
137 | useProtectedVideoMemory: 0
138 | minimumSupportedHeadTracking: 0
139 | maximumSupportedHeadTracking: 1
140 | hololens:
141 | depthFormat: 1
142 | depthBufferSharingEnabled: 0
143 | oculus:
144 | sharedDepthBuffer: 0
145 | dashSupport: 0
146 | enable360StereoCapture: 0
147 | protectGraphicsMemory: 0
148 | useHDRDisplay: 0
149 | m_ColorGamuts: 00000000
150 | targetPixelDensity: 30
151 | resolutionScalingMode: 0
152 | androidSupportedAspectRatio: 1
153 | androidMaxAspectRatio: 2.1
154 | applicationIdentifier:
155 | Standalone: com.Company.ProductName
156 | buildNumber: {}
157 | AndroidBundleVersionCode: 1
158 | AndroidMinSdkVersion: 16
159 | AndroidTargetSdkVersion: 0
160 | AndroidPreferredInstallLocation: 1
161 | aotOptions:
162 | stripEngineCode: 1
163 | iPhoneStrippingLevel: 0
164 | iPhoneScriptCallOptimization: 0
165 | ForceInternetPermission: 0
166 | ForceSDCardPermission: 0
167 | CreateWallpaper: 0
168 | APKExpansionFiles: 0
169 | keepLoadedShadersAlive: 0
170 | StripUnusedMeshComponents: 1
171 | VertexChannelCompressionMask: 4054
172 | iPhoneSdkVersion: 988
173 | iOSTargetOSVersionString: 8.0
174 | tvOSSdkVersion: 0
175 | tvOSRequireExtendedGameController: 0
176 | tvOSTargetOSVersionString: 9.0
177 | uIPrerenderedIcon: 0
178 | uIRequiresPersistentWiFi: 0
179 | uIRequiresFullScreen: 1
180 | uIStatusBarHidden: 1
181 | uIExitOnSuspend: 0
182 | uIStatusBarStyle: 0
183 | iPhoneSplashScreen: {fileID: 0}
184 | iPhoneHighResSplashScreen: {fileID: 0}
185 | iPhoneTallHighResSplashScreen: {fileID: 0}
186 | iPhone47inSplashScreen: {fileID: 0}
187 | iPhone55inPortraitSplashScreen: {fileID: 0}
188 | iPhone55inLandscapeSplashScreen: {fileID: 0}
189 | iPhone58inPortraitSplashScreen: {fileID: 0}
190 | iPhone58inLandscapeSplashScreen: {fileID: 0}
191 | iPadPortraitSplashScreen: {fileID: 0}
192 | iPadHighResPortraitSplashScreen: {fileID: 0}
193 | iPadLandscapeSplashScreen: {fileID: 0}
194 | iPadHighResLandscapeSplashScreen: {fileID: 0}
195 | appleTVSplashScreen: {fileID: 0}
196 | appleTVSplashScreen2x: {fileID: 0}
197 | tvOSSmallIconLayers: []
198 | tvOSSmallIconLayers2x: []
199 | tvOSLargeIconLayers: []
200 | tvOSLargeIconLayers2x: []
201 | tvOSTopShelfImageLayers: []
202 | tvOSTopShelfImageLayers2x: []
203 | tvOSTopShelfImageWideLayers: []
204 | tvOSTopShelfImageWideLayers2x: []
205 | iOSLaunchScreenType: 0
206 | iOSLaunchScreenPortrait: {fileID: 0}
207 | iOSLaunchScreenLandscape: {fileID: 0}
208 | iOSLaunchScreenBackgroundColor:
209 | serializedVersion: 2
210 | rgba: 0
211 | iOSLaunchScreenFillPct: 100
212 | iOSLaunchScreenSize: 100
213 | iOSLaunchScreenCustomXibPath:
214 | iOSLaunchScreeniPadType: 0
215 | iOSLaunchScreeniPadImage: {fileID: 0}
216 | iOSLaunchScreeniPadBackgroundColor:
217 | serializedVersion: 2
218 | rgba: 0
219 | iOSLaunchScreeniPadFillPct: 100
220 | iOSLaunchScreeniPadSize: 100
221 | iOSLaunchScreeniPadCustomXibPath:
222 | iOSUseLaunchScreenStoryboard: 0
223 | iOSLaunchScreenCustomStoryboardPath:
224 | iOSDeviceRequirements: []
225 | iOSURLSchemes: []
226 | iOSBackgroundModes: 0
227 | iOSMetalForceHardShadows: 0
228 | metalEditorSupport: 1
229 | metalAPIValidation: 1
230 | iOSRenderExtraFrameOnPause: 0
231 | appleDeveloperTeamID:
232 | iOSManualSigningProvisioningProfileID:
233 | tvOSManualSigningProvisioningProfileID:
234 | iOSManualSigningProvisioningProfileType: 0
235 | tvOSManualSigningProvisioningProfileType: 0
236 | appleEnableAutomaticSigning: 0
237 | iOSRequireARKit: 0
238 | appleEnableProMotion: 0
239 | vulkanEditorSupport: 0
240 | clonedFromGUID: 5f34be1353de5cf4398729fda238591b
241 | templatePackageId: com.unity.template.2d@1.0.1
242 | templateDefaultScene: Assets/Scenes/SampleScene.unity
243 | AndroidTargetArchitectures: 5
244 | AndroidSplashScreenScale: 0
245 | androidSplashScreen: {fileID: 0}
246 | AndroidKeystoreName:
247 | AndroidKeyaliasName:
248 | AndroidBuildApkPerCpuArchitecture: 0
249 | AndroidTVCompatibility: 1
250 | AndroidIsGame: 1
251 | AndroidEnableTango: 0
252 | androidEnableBanner: 1
253 | androidUseLowAccuracyLocation: 0
254 | m_AndroidBanners:
255 | - width: 320
256 | height: 180
257 | banner: {fileID: 0}
258 | androidGamepadSupportLevel: 0
259 | resolutionDialogBanner: {fileID: 0}
260 | m_BuildTargetIcons: []
261 | m_BuildTargetPlatformIcons: []
262 | m_BuildTargetBatching: []
263 | m_BuildTargetGraphicsAPIs: []
264 | m_BuildTargetVRSettings: []
265 | m_BuildTargetEnableVuforiaSettings: []
266 | openGLRequireES31: 0
267 | openGLRequireES31AEP: 0
268 | m_TemplateCustomTags: {}
269 | mobileMTRendering:
270 | Android: 1
271 | iPhone: 1
272 | tvOS: 1
273 | m_BuildTargetGroupLightmapEncodingQuality: []
274 | m_BuildTargetGroupLightmapSettings: []
275 | playModeTestRunnerEnabled: 0
276 | runPlayModeTestAsEditModeTest: 0
277 | actionOnDotNetUnhandledException: 1
278 | enableInternalProfiler: 0
279 | logObjCUncaughtExceptions: 1
280 | enableCrashReportAPI: 0
281 | cameraUsageDescription:
282 | locationUsageDescription:
283 | microphoneUsageDescription:
284 | switchNetLibKey:
285 | switchSocketMemoryPoolSize: 6144
286 | switchSocketAllocatorPoolSize: 128
287 | switchSocketConcurrencyLimit: 14
288 | switchScreenResolutionBehavior: 2
289 | switchUseCPUProfiler: 0
290 | switchApplicationID: 0x01004b9000490000
291 | switchNSODependencies:
292 | switchTitleNames_0:
293 | switchTitleNames_1:
294 | switchTitleNames_2:
295 | switchTitleNames_3:
296 | switchTitleNames_4:
297 | switchTitleNames_5:
298 | switchTitleNames_6:
299 | switchTitleNames_7:
300 | switchTitleNames_8:
301 | switchTitleNames_9:
302 | switchTitleNames_10:
303 | switchTitleNames_11:
304 | switchTitleNames_12:
305 | switchTitleNames_13:
306 | switchTitleNames_14:
307 | switchPublisherNames_0:
308 | switchPublisherNames_1:
309 | switchPublisherNames_2:
310 | switchPublisherNames_3:
311 | switchPublisherNames_4:
312 | switchPublisherNames_5:
313 | switchPublisherNames_6:
314 | switchPublisherNames_7:
315 | switchPublisherNames_8:
316 | switchPublisherNames_9:
317 | switchPublisherNames_10:
318 | switchPublisherNames_11:
319 | switchPublisherNames_12:
320 | switchPublisherNames_13:
321 | switchPublisherNames_14:
322 | switchIcons_0: {fileID: 0}
323 | switchIcons_1: {fileID: 0}
324 | switchIcons_2: {fileID: 0}
325 | switchIcons_3: {fileID: 0}
326 | switchIcons_4: {fileID: 0}
327 | switchIcons_5: {fileID: 0}
328 | switchIcons_6: {fileID: 0}
329 | switchIcons_7: {fileID: 0}
330 | switchIcons_8: {fileID: 0}
331 | switchIcons_9: {fileID: 0}
332 | switchIcons_10: {fileID: 0}
333 | switchIcons_11: {fileID: 0}
334 | switchIcons_12: {fileID: 0}
335 | switchIcons_13: {fileID: 0}
336 | switchIcons_14: {fileID: 0}
337 | switchSmallIcons_0: {fileID: 0}
338 | switchSmallIcons_1: {fileID: 0}
339 | switchSmallIcons_2: {fileID: 0}
340 | switchSmallIcons_3: {fileID: 0}
341 | switchSmallIcons_4: {fileID: 0}
342 | switchSmallIcons_5: {fileID: 0}
343 | switchSmallIcons_6: {fileID: 0}
344 | switchSmallIcons_7: {fileID: 0}
345 | switchSmallIcons_8: {fileID: 0}
346 | switchSmallIcons_9: {fileID: 0}
347 | switchSmallIcons_10: {fileID: 0}
348 | switchSmallIcons_11: {fileID: 0}
349 | switchSmallIcons_12: {fileID: 0}
350 | switchSmallIcons_13: {fileID: 0}
351 | switchSmallIcons_14: {fileID: 0}
352 | switchManualHTML:
353 | switchAccessibleURLs:
354 | switchLegalInformation:
355 | switchMainThreadStackSize: 1048576
356 | switchPresenceGroupId:
357 | switchLogoHandling: 0
358 | switchReleaseVersion: 0
359 | switchDisplayVersion: 1.0.0
360 | switchStartupUserAccount: 0
361 | switchTouchScreenUsage: 0
362 | switchSupportedLanguagesMask: 0
363 | switchLogoType: 0
364 | switchApplicationErrorCodeCategory:
365 | switchUserAccountSaveDataSize: 0
366 | switchUserAccountSaveDataJournalSize: 0
367 | switchApplicationAttribute: 0
368 | switchCardSpecSize: -1
369 | switchCardSpecClock: -1
370 | switchRatingsMask: 0
371 | switchRatingsInt_0: 0
372 | switchRatingsInt_1: 0
373 | switchRatingsInt_2: 0
374 | switchRatingsInt_3: 0
375 | switchRatingsInt_4: 0
376 | switchRatingsInt_5: 0
377 | switchRatingsInt_6: 0
378 | switchRatingsInt_7: 0
379 | switchRatingsInt_8: 0
380 | switchRatingsInt_9: 0
381 | switchRatingsInt_10: 0
382 | switchRatingsInt_11: 0
383 | switchLocalCommunicationIds_0:
384 | switchLocalCommunicationIds_1:
385 | switchLocalCommunicationIds_2:
386 | switchLocalCommunicationIds_3:
387 | switchLocalCommunicationIds_4:
388 | switchLocalCommunicationIds_5:
389 | switchLocalCommunicationIds_6:
390 | switchLocalCommunicationIds_7:
391 | switchParentalControl: 0
392 | switchAllowsScreenshot: 1
393 | switchAllowsVideoCapturing: 1
394 | switchAllowsRuntimeAddOnContentInstall: 0
395 | switchDataLossConfirmation: 0
396 | switchUserAccountLockEnabled: 0
397 | switchSupportedNpadStyles: 3
398 | switchNativeFsCacheSize: 32
399 | switchIsHoldTypeHorizontal: 0
400 | switchSupportedNpadCount: 8
401 | switchSocketConfigEnabled: 0
402 | switchTcpInitialSendBufferSize: 32
403 | switchTcpInitialReceiveBufferSize: 64
404 | switchTcpAutoSendBufferSizeMax: 256
405 | switchTcpAutoReceiveBufferSizeMax: 256
406 | switchUdpSendBufferSize: 9
407 | switchUdpReceiveBufferSize: 42
408 | switchSocketBufferEfficiency: 4
409 | switchSocketInitializeEnabled: 1
410 | switchNetworkInterfaceManagerInitializeEnabled: 1
411 | switchPlayerConnectionEnabled: 1
412 | ps4NPAgeRating: 12
413 | ps4NPTitleSecret:
414 | ps4NPTrophyPackPath:
415 | ps4ParentalLevel: 11
416 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
417 | ps4Category: 0
418 | ps4MasterVersion: 01.00
419 | ps4AppVersion: 01.00
420 | ps4AppType: 0
421 | ps4ParamSfxPath:
422 | ps4VideoOutPixelFormat: 0
423 | ps4VideoOutInitialWidth: 1920
424 | ps4VideoOutBaseModeInitialWidth: 1920
425 | ps4VideoOutReprojectionRate: 60
426 | ps4PronunciationXMLPath:
427 | ps4PronunciationSIGPath:
428 | ps4BackgroundImagePath:
429 | ps4StartupImagePath:
430 | ps4StartupImagesFolder:
431 | ps4IconImagesFolder:
432 | ps4SaveDataImagePath:
433 | ps4SdkOverride:
434 | ps4BGMPath:
435 | ps4ShareFilePath:
436 | ps4ShareOverlayImagePath:
437 | ps4PrivacyGuardImagePath:
438 | ps4NPtitleDatPath:
439 | ps4RemotePlayKeyAssignment: -1
440 | ps4RemotePlayKeyMappingDir:
441 | ps4PlayTogetherPlayerCount: 0
442 | ps4EnterButtonAssignment: 1
443 | ps4ApplicationParam1: 0
444 | ps4ApplicationParam2: 0
445 | ps4ApplicationParam3: 0
446 | ps4ApplicationParam4: 0
447 | ps4DownloadDataSize: 0
448 | ps4GarlicHeapSize: 2048
449 | ps4ProGarlicHeapSize: 2560
450 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
451 | ps4pnSessions: 1
452 | ps4pnPresence: 1
453 | ps4pnFriends: 1
454 | ps4pnGameCustomData: 1
455 | playerPrefsSupport: 0
456 | enableApplicationExit: 0
457 | restrictedAudioUsageRights: 0
458 | ps4UseResolutionFallback: 0
459 | ps4ReprojectionSupport: 0
460 | ps4UseAudio3dBackend: 0
461 | ps4SocialScreenEnabled: 0
462 | ps4ScriptOptimizationLevel: 0
463 | ps4Audio3dVirtualSpeakerCount: 14
464 | ps4attribCpuUsage: 0
465 | ps4PatchPkgPath:
466 | ps4PatchLatestPkgPath:
467 | ps4PatchChangeinfoPath:
468 | ps4PatchDayOne: 0
469 | ps4attribUserManagement: 0
470 | ps4attribMoveSupport: 0
471 | ps4attrib3DSupport: 0
472 | ps4attribShareSupport: 0
473 | ps4attribExclusiveVR: 0
474 | ps4disableAutoHideSplash: 0
475 | ps4videoRecordingFeaturesUsed: 0
476 | ps4contentSearchFeaturesUsed: 0
477 | ps4attribEyeToEyeDistanceSettingVR: 0
478 | ps4IncludedModules: []
479 | monoEnv:
480 | psp2Splashimage: {fileID: 0}
481 | psp2NPTrophyPackPath:
482 | psp2NPSupportGBMorGJP: 0
483 | psp2NPAgeRating: 12
484 | psp2NPTitleDatPath:
485 | psp2NPCommsID:
486 | psp2NPCommunicationsID:
487 | psp2NPCommsPassphrase:
488 | psp2NPCommsSig:
489 | psp2ParamSfxPath:
490 | psp2ManualPath:
491 | psp2LiveAreaGatePath:
492 | psp2LiveAreaBackroundPath:
493 | psp2LiveAreaPath:
494 | psp2LiveAreaTrialPath:
495 | psp2PatchChangeInfoPath:
496 | psp2PatchOriginalPackage:
497 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui
498 | psp2KeystoneFile:
499 | psp2MemoryExpansionMode: 0
500 | psp2DRMType: 0
501 | psp2StorageType: 0
502 | psp2MediaCapacity: 0
503 | psp2DLCConfigPath:
504 | psp2ThumbnailPath:
505 | psp2BackgroundPath:
506 | psp2SoundPath:
507 | psp2TrophyCommId:
508 | psp2TrophyPackagePath:
509 | psp2PackagedResourcesPath:
510 | psp2SaveDataQuota: 10240
511 | psp2ParentalLevel: 1
512 | psp2ShortTitle: Not Set
513 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
514 | psp2Category: 0
515 | psp2MasterVersion: 01.00
516 | psp2AppVersion: 01.00
517 | psp2TVBootMode: 0
518 | psp2EnterButtonAssignment: 2
519 | psp2TVDisableEmu: 0
520 | psp2AllowTwitterDialog: 1
521 | psp2Upgradable: 0
522 | psp2HealthWarning: 0
523 | psp2UseLibLocation: 0
524 | psp2InfoBarOnStartup: 0
525 | psp2InfoBarColor: 0
526 | psp2ScriptOptimizationLevel: 0
527 | splashScreenBackgroundSourceLandscape: {fileID: 0}
528 | splashScreenBackgroundSourcePortrait: {fileID: 0}
529 | spritePackerPolicy:
530 | webGLMemorySize: 256
531 | webGLExceptionSupport: 1
532 | webGLNameFilesAsHashes: 0
533 | webGLDataCaching: 1
534 | webGLDebugSymbols: 0
535 | webGLEmscriptenArgs:
536 | webGLModulesDirectory:
537 | webGLTemplate: APPLICATION:Default
538 | webGLAnalyzeBuildSize: 0
539 | webGLUseEmbeddedResources: 0
540 | webGLCompressionFormat: 1
541 | webGLLinkerTarget: 1
542 | scriptingDefineSymbols: {}
543 | platformArchitecture: {}
544 | scriptingBackend: {}
545 | il2cppCompilerConfiguration: {}
546 | incrementalIl2cppBuild: {}
547 | allowUnsafeCode: 0
548 | additionalIl2CppArgs:
549 | scriptingRuntimeVersion: 0
550 | apiCompatibilityLevelPerPlatform: {}
551 | m_RenderingPath: 1
552 | m_MobileRenderingPath: 1
553 | metroPackageName: Template_2D
554 | metroPackageVersion:
555 | metroCertificatePath:
556 | metroCertificatePassword:
557 | metroCertificateSubject:
558 | metroCertificateIssuer:
559 | metroCertificateNotAfter: 0000000000000000
560 | metroApplicationDescription: Template_2D
561 | wsaImages: {}
562 | metroTileShortName:
563 | metroTileShowName: 0
564 | metroMediumTileShowName: 0
565 | metroLargeTileShowName: 0
566 | metroWideTileShowName: 0
567 | metroDefaultTileSize: 1
568 | metroTileForegroundText: 2
569 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
570 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
571 | a: 1}
572 | metroSplashScreenUseBackgroundColor: 0
573 | platformCapabilities: {}
574 | metroFTAName:
575 | metroFTAFileTypes: []
576 | metroProtocolName:
577 | metroCompilationOverrides: 1
578 | n3dsUseExtSaveData: 0
579 | n3dsCompressStaticMem: 1
580 | n3dsExtSaveDataNumber: 0x12345
581 | n3dsStackSize: 131072
582 | n3dsTargetPlatform: 2
583 | n3dsRegion: 7
584 | n3dsMediaSize: 0
585 | n3dsLogoStyle: 3
586 | n3dsTitle: GameName
587 | n3dsProductCode:
588 | n3dsApplicationId: 0xFF3FF
589 | XboxOneProductId:
590 | XboxOneUpdateKey:
591 | XboxOneSandboxId:
592 | XboxOneContentId:
593 | XboxOneTitleId:
594 | XboxOneSCId:
595 | XboxOneGameOsOverridePath:
596 | XboxOnePackagingOverridePath:
597 | XboxOneAppManifestOverridePath:
598 | XboxOneVersion: 1.0.0.0
599 | XboxOnePackageEncryption: 0
600 | XboxOnePackageUpdateGranularity: 2
601 | XboxOneDescription:
602 | XboxOneLanguage:
603 | - enus
604 | XboxOneCapability: []
605 | XboxOneGameRating: {}
606 | XboxOneIsContentPackage: 0
607 | XboxOneEnableGPUVariability: 0
608 | XboxOneSockets: {}
609 | XboxOneSplashScreen: {fileID: 0}
610 | XboxOneAllowedProductIds: []
611 | XboxOnePersistentLocalStorageSize: 0
612 | XboxOneXTitleMemory: 8
613 | xboxOneScriptCompiler: 0
614 | vrEditorSettings:
615 | daydream:
616 | daydreamIconForeground: {fileID: 0}
617 | daydreamIconBackground: {fileID: 0}
618 | cloudServicesEnabled:
619 | UNet: 1
620 | facebookSdkVersion: 7.9.4
621 | apiCompatibilityLevel: 2
622 | cloudProjectId:
623 | projectName:
624 | organizationId:
625 | cloudEnabled: 0
626 | enableNativePlatformBackendsForNewInputSystem: 0
627 | disableOldInputManagerSupport: 0
628 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2018.2.13f1
2 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 3
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | particleRaycastBudget: 4
33 | asyncUploadTimeSlice: 2
34 | asyncUploadBufferSize: 4
35 | resolutionScalingFixedDPIFactor: 1
36 | excludedTargetPlatforms: []
37 | - serializedVersion: 2
38 | name: Low
39 | pixelLightCount: 0
40 | shadows: 0
41 | shadowResolution: 0
42 | shadowProjection: 1
43 | shadowCascades: 1
44 | shadowDistance: 20
45 | shadowNearPlaneOffset: 3
46 | shadowCascade2Split: 0.33333334
47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
48 | shadowmaskMode: 0
49 | blendWeights: 2
50 | textureQuality: 0
51 | anisotropicTextures: 0
52 | antiAliasing: 0
53 | softParticles: 0
54 | softVegetation: 0
55 | realtimeReflectionProbes: 0
56 | billboardsFaceCameraPosition: 0
57 | vSyncCount: 0
58 | lodBias: 0.4
59 | maximumLODLevel: 0
60 | particleRaycastBudget: 16
61 | asyncUploadTimeSlice: 2
62 | asyncUploadBufferSize: 4
63 | resolutionScalingFixedDPIFactor: 1
64 | excludedTargetPlatforms: []
65 | - serializedVersion: 2
66 | name: Medium
67 | pixelLightCount: 1
68 | shadows: 0
69 | shadowResolution: 0
70 | shadowProjection: 1
71 | shadowCascades: 1
72 | shadowDistance: 20
73 | shadowNearPlaneOffset: 3
74 | shadowCascade2Split: 0.33333334
75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
76 | shadowmaskMode: 0
77 | blendWeights: 2
78 | textureQuality: 0
79 | anisotropicTextures: 0
80 | antiAliasing: 0
81 | softParticles: 0
82 | softVegetation: 0
83 | realtimeReflectionProbes: 0
84 | billboardsFaceCameraPosition: 0
85 | vSyncCount: 1
86 | lodBias: 0.7
87 | maximumLODLevel: 0
88 | particleRaycastBudget: 64
89 | asyncUploadTimeSlice: 2
90 | asyncUploadBufferSize: 4
91 | resolutionScalingFixedDPIFactor: 1
92 | excludedTargetPlatforms: []
93 | - serializedVersion: 2
94 | name: High
95 | pixelLightCount: 2
96 | shadows: 0
97 | shadowResolution: 1
98 | shadowProjection: 1
99 | shadowCascades: 2
100 | shadowDistance: 40
101 | shadowNearPlaneOffset: 3
102 | shadowCascade2Split: 0.33333334
103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
104 | shadowmaskMode: 1
105 | blendWeights: 2
106 | textureQuality: 0
107 | anisotropicTextures: 0
108 | antiAliasing: 0
109 | softParticles: 0
110 | softVegetation: 1
111 | realtimeReflectionProbes: 0
112 | billboardsFaceCameraPosition: 0
113 | vSyncCount: 1
114 | lodBias: 1
115 | maximumLODLevel: 0
116 | particleRaycastBudget: 256
117 | asyncUploadTimeSlice: 2
118 | asyncUploadBufferSize: 4
119 | resolutionScalingFixedDPIFactor: 1
120 | excludedTargetPlatforms: []
121 | - serializedVersion: 2
122 | name: Very High
123 | pixelLightCount: 3
124 | shadows: 0
125 | shadowResolution: 2
126 | shadowProjection: 1
127 | shadowCascades: 2
128 | shadowDistance: 70
129 | shadowNearPlaneOffset: 3
130 | shadowCascade2Split: 0.33333334
131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
132 | shadowmaskMode: 1
133 | blendWeights: 4
134 | textureQuality: 0
135 | anisotropicTextures: 0
136 | antiAliasing: 0
137 | softParticles: 0
138 | softVegetation: 1
139 | realtimeReflectionProbes: 0
140 | billboardsFaceCameraPosition: 0
141 | vSyncCount: 1
142 | lodBias: 1.5
143 | maximumLODLevel: 0
144 | particleRaycastBudget: 1024
145 | asyncUploadTimeSlice: 2
146 | asyncUploadBufferSize: 4
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Ultra
151 | pixelLightCount: 4
152 | shadows: 0
153 | shadowResolution: 0
154 | shadowProjection: 1
155 | shadowCascades: 4
156 | shadowDistance: 150
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 0
164 | antiAliasing: 0
165 | softParticles: 0
166 | softVegetation: 1
167 | realtimeReflectionProbes: 0
168 | billboardsFaceCameraPosition: 0
169 | vSyncCount: 1
170 | lodBias: 2
171 | maximumLODLevel: 0
172 | particleRaycastBudget: 4096
173 | asyncUploadTimeSlice: 2
174 | asyncUploadBufferSize: 4
175 | resolutionScalingFixedDPIFactor: 1
176 | excludedTargetPlatforms: []
177 | m_PerPlatformDefaultQuality:
178 | Android: 2
179 | Nintendo 3DS: 5
180 | Nintendo Switch: 5
181 | PS4: 5
182 | PSM: 5
183 | PSP2: 2
184 | Standalone: 5
185 | Tizen: 2
186 | WebGL: 3
187 | WiiU: 5
188 | Windows Store Apps: 5
189 | XboxOne: 5
190 | iPhone: 2
191 | tvOS: 2
192 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.1
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_TestMode: 0
8 | m_TestEventUrl:
9 | m_TestConfigUrl:
10 | m_TestInitMode: 0
11 | CrashReportingSettings:
12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate
14 | m_Enabled: 0
15 | m_CaptureEditorExceptions: 1
16 | UnityPurchasingSettings:
17 | m_Enabled: 0
18 | m_TestMode: 0
19 | UnityAnalyticsSettings:
20 | m_Enabled: 0
21 | m_InitializeOnStartup: 1
22 | m_TestMode: 0
23 | m_TestEventUrl:
24 | m_TestConfigUrl:
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity Behaviour Tree
2 |
3 | A convenient library to make behaviour trees in Unity3D
4 |
5 | ```C#
6 | public class SomeNode : ComplexSequenceNode {
7 |
8 | public override IEnumerable> GetChilds() {
9 |
10 | yield return new WaitNode(1);
11 |
12 | // A second has passed
13 |
14 | // We can call a function on the agent
15 | ctx.agent.FireWeapon();
16 |
17 | // The weapon was fired
18 | // We can write some decision code here
19 | if (ctx.agent.IsInDanger) {
20 | // It's dangerous here, let's flee!
21 | yield return new FleeNode();
22 | } else {
23 | // Coast is clear, keep moving
24 | yield return new AdvanceNode();
25 | }
26 | }
27 | }
28 | ```
29 |
30 | ## How to install
31 |
32 | - Download this [unity package](https://github.com/GibsS/unity-behaviour-tree/releases/download/v1.0/behaviour-tree.unitypackage), it contains the source code for the package
33 | - Import it in your project.
34 | - Rename and move the base folder at your convenience.
35 |
36 | ## Features
37 |
38 | This is a library that allows you to create complex behaviour trees with ease. Nothing particularly fancy, it just gets the job done.
39 |
40 | If you want a lesson on how behaviour trees work, check [this article out](https://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php). We don't use the exact same language but the principles are the same and they explain behaviour trees very well.
41 |
42 | To create an AI, make a class that inherit ```BehaviourTree``` and specify the RootNode. From there you just have to make a tree out of
43 | the existing nodes or your custom nodes. See below for a list of the base nodes. The behaviour tree will execute the root node in a loop until you stop it.
44 |
45 | One of the 'innovation' of this library is the use of C# IEnumerable function syntax to write complex sequences (I haven't seen this anywhere else at least..). Traditional behaviour tree just let you write static sequences of nodes and you have to mess around with selectors to make anything more complicated. You can do stuff like the example above.
46 |
47 | Neat right? It allows you to keep your behaviour trees a bit lighter and more readable than traditional behaviour trees.
48 |
49 | ## Create a behaviour tree
50 |
51 | In this library, an "Agent" represents an entity the AI is meant to control. To create an AI that controls said Agent, write something like this:
52 |
53 | ```C#
54 | public class YourAgent : MonoBehaviour {
55 |
56 | void Start() {
57 | // Create an AI
58 | var tree = new YourTree();
59 |
60 | // Call start to actually run the AI.
61 | // The first argument is the MonoBehaviour the tree attaches to and depends on (like a coroutine),
62 | // the second is the agent to control
63 | tree.Start(this, this);
64 | }
65 | }
66 |
67 | class YourTree : BehaviourTree {
68 |
69 | protected override BehaviourNode GetRootNode() {
70 | return new YourRootNode();
71 | }
72 | }
73 | ```
74 |
75 | ## Create your own node
76 |
77 | Most 'structural nodes' (sequences, selectors, decorators..) are provided with the library so you'll only have to implement leaf nodes: the nodes that make your agent perfom actions.
78 |
79 | To create your own node, you just need to create a class that implements ```BehaviourNode```:
80 |
81 | ```C#
82 | public class YourNode : BehaviourNode {
83 |
84 | // Called when the node is entered
85 | public State Start() {
86 | return State.IN_PROGRESS;
87 | }
88 |
89 | // Called every frame while the node is active
90 | public State Update() {
91 | // DO STUFF HERE
92 | if(Done()) {
93 | return State.SUCCESS;
94 | } else {
95 | return State.IN_PROGRESS;
96 | }
97 | }
98 |
99 | ...
100 | }
101 |
102 | ```
103 |
104 | You can access your agent through ```ctx.agent``` inside your inherited class.
105 |
106 | If you wish to create your own decorator or composite nodes, we recommend you look at the ```DecoratorNode``` and ```ParentBehaviourNode``` classes and inherit them.
107 |
108 | ## Boards (aka Blackboards)
109 |
110 | These objects are shared between every node of your tree. They allow you to share information and calculation between the different nodes and they help keep the nodes stateless.
111 |
112 | To define a board, write a class like this:
113 |
114 | ```C#
115 | public class YourBoard : BehaviourTreeBoard {
116 |
117 | public int someDataToShare;
118 | }
119 | ```
120 |
121 | To create and use it, write:
122 |
123 | ```C#
124 | // Inside your node
125 | var board = ctx.GetBoard();
126 |
127 | board.someDataToShare++;
128 | ```
129 |
130 | The 'GetBoard' function will create the board if it doesn't exist yet.
131 |
132 | ## Nodes
133 |
134 | The main nodes provided with this library:
135 |
136 | *ComplexSequenceNode*
137 |
138 | This is the type of node you'll use the most, it allows you to specify a 'dynamic' list of child nodes. If one of the child returns a FAILURE, the node returns a FAILURE. Otherwise it returns a SUCCESS.
139 |
140 | ```C#
141 | public class SomeNode : ComplexSequenceNode {
142 |
143 | public override IEnumerable> GetChilds() {
144 |
145 | yield return new WaitNode(1);
146 |
147 | // A second has passed
148 |
149 | // We can call a function on the agent
150 | ctx.agent.FireWeapon();
151 |
152 | // The weapon was fired
153 | // We can write some decision code here
154 | if (ctx.agent.IsInDanger) {
155 | // It's dangerous here, let's flee!
156 | yield return new FleeNode();
157 | } else {
158 | // Coast is clear, keep moving
159 | yield return new AdvanceNode();
160 | }
161 | }
162 | }
163 | ```
164 |
165 | *SequenceNode*
166 |
167 | A classic sequence. Simply executes all of it's children (specified in the constructor). If one of them returns a FAILURE, it returns a FAILURE, otherwise it returns a SUCCESS once all children have returned.
168 |
169 |
170 | ```C#
171 | var sequence = new SequenceNode(
172 | new SomeNode(),
173 | new SomeOtherNode(),
174 | new SomeNode()
175 | );
176 |
177 | ```
178 |
179 | *SelectorNode*
180 |
181 | The ```SelectorNode``` is provided a list of nodes and a predicate for each node. On every frame, the selector will loop through all the nodes and pick the first one which has a predicate that returns true. It returns the same state as its selected child.
182 |
183 | ```C#
184 | var selector = new SelectorNode(
185 | new Selection(ctx => PickIfInDanger(), new WhenInDangerNode()),
186 | new Selection(ctx => PickIfSafe(), new WhenSafeNode())
187 | )
188 | ```
189 |
190 | *InvertorNode*
191 |
192 | The ```InverterNode``` is given a child node and returns the IN_PROGRESS if the child returns IN_PROGRESS and the opposite otherwise: if the child returns SUCCESS, it will return FAILURE and vice versa.
193 |
194 | *FailureNode*
195 |
196 | The ```FailureNode```is given a child node and returns the IN_PROGRESS if the child returns IN_PROGRESS and FAILURE otherwise, regardless of if the child returns FAILURE or SUCCESS.
197 |
198 | *SuccessNode*
199 |
200 | The ```SuccessNode```is given a child node and returns the IN_PROGRESS if the child returns IN_PROGRESS and SUCCESS otherwise, regardless of if the child returns FAILURE or SUCCESS.
201 |
202 | *WaitNode*
203 |
204 | Pauses the AI for a certain duration.
205 |
206 | *WaitForever*
207 |
208 | Pauses the AI until this node is no longer activated (can be deactivated due to a selector change for example).
209 |
210 | *WaitUntil*
211 |
212 | Pauses until a provided condition is met.
213 |
214 | *WaitWhile*
215 |
216 | Pauses while a provided condition is met.
217 |
--------------------------------------------------------------------------------