diff --git a/Assets/Standard Assets/Scripts/AI/GOAP/GoapPlanner.cs b/Assets/Standard Assets/Scripts/AI/GOAP/GoapPlanner.cs index 3d3b1f7..33a3f7a 100644 --- a/Assets/Standard Assets/Scripts/AI/GOAP/GoapPlanner.cs +++ b/Assets/Standard Assets/Scripts/AI/GOAP/GoapPlanner.cs @@ -132,6 +132,9 @@ private HashSet actionSubset(HashSet actions, GoapAction */ private bool inState(HashSet> test, HashSet> state) { bool allMatch = true; + if (test.Count < 1) { + return false; + } foreach (KeyValuePair t in test) { bool match = false; foreach (KeyValuePair s in state) {