diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs index f32072fc..b7563f51 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Actions/EatAction.cs @@ -5,6 +5,7 @@ using CrashKonijn.Goap.Demos.Complex.Goap; using CrashKonijn.Goap.Demos.Complex.Interfaces; using CrashKonijn.Goap.Runtime; +using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Actions { @@ -16,7 +17,7 @@ public void Inject(GoapInjector injector) { this.instanceHandler = injector.instanceHandler; } - + public override void Created() { } diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs index a640f6bc..e3457bc8 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/AgentSpawnBehaviour.cs @@ -29,6 +29,8 @@ private void Awake() private void Start() { this.SpawnAgent(SetIds.Cleaner, ComplexAgentBrain.AgentType.Cleaner, this.cleanerColor); + this.SpawnAgent(SetIds.Cleaner, ComplexAgentBrain.AgentType.Cleaner, this.cleanerColor); + this.SpawnAgent(SetIds.Cleaner, ComplexAgentBrain.AgentType.Cleaner, this.cleanerColor); this.SpawnAgent(SetIds.Smith, ComplexAgentBrain.AgentType.Smith, this.smithColor); this.SpawnAgent(SetIds.Miner, ComplexAgentBrain.AgentType.Miner, this.minerColor); diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs index f27f3f06..0f064dfc 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexAgentBrain.cs @@ -10,14 +10,14 @@ namespace CrashKonijn.Goap.Demos.Complex.Behaviours public class ComplexAgentBrain : MonoBehaviour { public AgentType agentType; - private GoapActionProvider agent; + private GoapActionProvider provider; private ComplexHungerBehaviour complexHunger; private ItemCollection itemCollection; private ComplexInventoryBehaviour inventory; private void Awake() { - this.agent = this.GetComponent(); + this.provider = this.GetComponent(); this.complexHunger = this.GetComponent(); this.inventory = this.GetComponent(); this.itemCollection = FindObjectOfType(); @@ -25,38 +25,38 @@ private void Awake() private void OnEnable() { - this.agent.Events.OnActionEnd += this.OnActionEnd; - this.agent.Events.OnNoActionFound += this.OnNoActionFound; - this.agent.Events.OnGoalCompleted += this.OnGoalCompleted; + this.provider.Events.OnActionEnd += this.OnActionEnd; + this.provider.Events.OnNoActionFound += this.OnNoActionFound; + this.provider.Events.OnGoalCompleted += this.OnGoalCompleted; } private void OnDisable() { - this.agent.Events.OnActionEnd -= this.OnActionEnd; - this.agent.Events.OnNoActionFound -= this.OnNoActionFound; - this.agent.Events.OnGoalCompleted -= this.OnGoalCompleted; + this.provider.Events.OnActionEnd -= this.OnActionEnd; + this.provider.Events.OnNoActionFound -= this.OnNoActionFound; + this.provider.Events.OnGoalCompleted -= this.OnGoalCompleted; } private void Start() { - this.agent.SetGoal(false); + this.provider.RequestGoal(false); } - private void OnNoActionFound(IGoal goal) + private void OnNoActionFound(IGoalRequest request) { - this.agent.SetGoal(false); + this.provider.RequestGoal(false); } private void OnGoalCompleted(IGoal goal) { - this.agent.SetGoal(false); + this.provider.RequestGoal(false); } private void OnActionEnd(IAction action) { this.UpdateHunger(); - if (this.agent.CurrentGoal is FixHungerGoal) + if (this.provider.CurrentPlan.Goal is FixHungerGoal) return; this.DetermineGoal(); @@ -66,11 +66,11 @@ private void UpdateHunger() { if (this.complexHunger.hunger > 80) { - this.agent.SetGoal(false); + this.provider.RequestGoal(true); return; } - if (this.agent.CurrentGoal is not FixHungerGoal) + if (this.provider.CurrentPlan.Goal is not FixHungerGoal) return; if (this.complexHunger.hunger < 20) @@ -100,62 +100,56 @@ private void DetermineMinerGoals() { if (this.inventory.Count() == 0 && this.itemCollection.Get().Length >= 1) { - this.agent.SetGoal>(false); + this.provider.RequestGoal>(false); return; } if (this.itemCollection.Get().Length <= 2) { - this.agent.SetGoal>(false); + this.provider.RequestGoal>(false); return; } - this.agent.SetGoal(false); + this.provider.RequestGoal(false); } private void DetermineWoodCutterGoals() { if (this.inventory.Count() == 0 && this.itemCollection.Get().Length >= 1) { - this.agent.SetGoal>(false); + this.provider.RequestGoal>(false); return; } if (this.itemCollection.Get().Length <= 2) { - this.agent.SetGoal>(false); + this.provider.RequestGoal>(false); return; } - this.agent.SetGoal(false); + this.provider.RequestGoal(false); } private void DetermineSmithGoals() { if (this.itemCollection.Get().Length <= 1) { - this.agent.SetGoal>(false); + this.provider.RequestGoal>(false); return; } if (this.itemCollection.Get().Length <= 1) { - this.agent.SetGoal>(false); + this.provider.RequestGoal>(false); return; } - this.agent.SetGoal(false); + this.provider.RequestGoal(false); } private void DetermineCleanerGoals() { - if (this.itemCollection.Count(false, false) > 0) - { - this.agent.SetGoal(false); - return; - } - - this.agent.SetGoal(false); + this.provider.RequestGoal(true); } public enum AgentType diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs index a1713cf9..c056cd03 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Behaviours/ComplexTextBehaviour.cs @@ -29,13 +29,13 @@ private void Update() private string GetText() { - if (this.actionProvider.CurrentGoal is null) + if (this.actionProvider.CurrentPlan is null) return $"{this.GetTypeText()}\nIdle"; - if (this.actionProvider.Agent.ActionState.Action is null) + if (this.actionProvider.Receiver.ActionState.Action is null) return $"{this.GetTypeText()}\nIdle"; - return $"{this.GetTypeText()}\n{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; + return $"{this.GetTypeText()}\n{this.actionProvider.CurrentPlan.GetType().GetGenericTypeName()}\n{this.actionProvider.Receiver.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleComplexHunger.hunger:0.00}"; } private string GetTypeText() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs index 2db1c4bd..bd604a8e 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/HungerCapability.cs @@ -4,6 +4,7 @@ using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; using CrashKonijn.Goap.Demos.Complex.Goals; using CrashKonijn.Goap.Demos.Complex.Interfaces; +using CrashKonijn.Goap.Demos.Complex.Sensors.World; using CrashKonijn.Goap.Demos.Complex.Targets; using CrashKonijn.Goap.Demos.Complex.WorldKeys; using CrashKonijn.Goap.Runtime; @@ -18,13 +19,15 @@ public override ICapabilityConfig Create() // Goals builder.AddGoal() - .AddCondition(Comparison.SmallerThanOrEqual, 0); + .AddCondition(Comparison.SmallerThanOrEqual, 0); // Actions builder.AddAction() .SetTarget() - .AddEffect(EffectType.Decrease) - .AddCondition>(Comparison.GreaterThanOrEqual, 1); + .AddEffect(EffectType.Decrease) + .AddCondition>(Comparison.GreaterThanOrEqual, 1) + .AddCondition(Comparison.GreaterThanOrEqual, 30) + .SetValidateConditions(false); // We don't need to validate conditions for this action, or it will stop when becoming below 80 hunger builder.AddAction>() .SetTarget>() @@ -45,6 +48,8 @@ public override ICapabilityConfig Create() // World sensors builder.AddIsHoldingSensor(); builder.AddIsInWorldSensor(); + builder.AddWorldSensor() + .SetKey(); return builder.Build(); } diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs index 5fe8b586..dfc131b9 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/Capabilities/WanderCapability.cs @@ -1,6 +1,5 @@ using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Demos.Complex.Actions; -using CrashKonijn.Goap.Demos.Complex.Factories.Extensions; using CrashKonijn.Goap.Demos.Complex.Goals; using CrashKonijn.Goap.Demos.Complex.Sensors.Target; using CrashKonijn.Goap.Demos.Complex.Targets; @@ -16,6 +15,7 @@ public override ICapabilityConfig Create() var builder = new CapabilityBuilder("WanderCapability"); builder.AddGoal() + .SetBaseCost(50) .AddCondition(Comparison.GreaterThanOrEqual, 1); builder.AddAction() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs index 132165a8..af1c1e8b 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Factories/CleanerAgentTypeConfigFactory.cs @@ -25,6 +25,7 @@ public override IAgentTypeConfig Create() builder.CreateCapability("CleanCapability", (capability) => { capability.AddGoal() + .SetBaseCost(20) .AddCondition(Comparison.SmallerThanOrEqual, 0); capability.AddAction() diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs index 7f7a6da6..efc67ac0 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Goals/FixHungerGoal.cs @@ -1,8 +1,27 @@ -using CrashKonijn.Goap.Runtime; +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Demos.Complex.Behaviours; +using CrashKonijn.Goap.Runtime; +using UnityEngine; namespace CrashKonijn.Goap.Demos.Complex.Goals { public class FixHungerGoal : GoalBase { + public override float GetCost(IActionReceiver agent, IComponentReference references) + { + var hunger = references.GetCachedComponent().hunger; + var limited = Mathf.Clamp(hunger, 0f, 100f); // Clamp between 0 and 100 + var normalized = limited / 100f; // Normalize between 0 and 1 + var curved = this.ExponentialCurve(normalized); // Apply exponential curve + var inverse = 1f - curved; // Inverse + + return 50 * inverse; + } + + private float ExponentialCurve(float t) + { + float sqr = t * t; + return sqr / (2.0f * (sqr - t) + 1.0f); + } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab index 7823ce3f..59b90b4b 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs/ComplexAgent.prefab @@ -70,7 +70,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1cef53d855ccf0b46bcf004b27c4a52a, type: 3} m_Name: m_EditorClassIdentifier: - k__BackingField: {fileID: -5926512986792016431} + k__BackingField: {fileID: -5926512986792016431} k__BackingField: k__BackingField: 1 k__BackingField: 20 diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Scenes/ComplexDemoScene.unity b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Scenes/ComplexDemoScene.unity index 7dd72d80..7cc37610 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Scenes/ComplexDemoScene.unity +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Scenes/ComplexDemoScene.unity @@ -705,10 +705,10 @@ MonoBehaviour: m_EditorClassIdentifier: configInitializer: {fileID: 395702497} agentTypeConfigFactories: - - {fileID: 1526725135} - - {fileID: 267963326} - {fileID: 544038563} + - {fileID: 1526725135} - {fileID: 1534347707} + - {fileID: 267963326} --- !u!4 &395702494 Transform: m_ObjectHideFlags: 0 diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/HungerSensor.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/HungerSensor.cs new file mode 100644 index 00000000..894d99fd --- /dev/null +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/HungerSensor.cs @@ -0,0 +1,25 @@ +using CrashKonijn.Agent.Core; +using CrashKonijn.Goap.Core; +using CrashKonijn.Goap.Demos.Complex.Behaviours; +using CrashKonijn.Goap.Runtime; + +namespace CrashKonijn.Goap.Demos.Complex.Sensors.World +{ + public class HungerSensor : LocalWorldSensorBase + { + public override void Created() + { + + } + + public override void Update() + { + + } + + public override SenseValue Sense(IActionReceiver agent, IComponentReference references) + { + return (int) references.GetCachedComponent().hunger; + } + } +} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/HungerSensor.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/HungerSensor.cs.meta new file mode 100644 index 00000000..3893e577 --- /dev/null +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/Sensors/World/HungerSensor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0ee71a871bb546f0b89be90f1231b6ae +timeCreated: 1719998989 \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/Hunger.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/Hunger.cs new file mode 100644 index 00000000..9661f45f --- /dev/null +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/Hunger.cs @@ -0,0 +1,7 @@ +using CrashKonijn.Goap.Runtime; + +namespace CrashKonijn.Goap.Demos.Complex +{ + [GoapId("Hunger-7de38d7e-b184-453a-9220-e8619c55fc1e")] + public class Hunger : WorldKeyBase {} +} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/Hunger.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/Hunger.cs.meta new file mode 100644 index 00000000..a302902c --- /dev/null +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/Hunger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d6a14dc12fa00843b074ee1237f4ce9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs deleted file mode 100644 index c47c5ca4..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs +++ /dev/null @@ -1,8 +0,0 @@ -using CrashKonijn.Goap.Runtime; - -namespace CrashKonijn.Goap.Demos.Complex.WorldKeys -{ - public class IsHungry : WorldKeyBase - { - } -} \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs.meta b/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs.meta deleted file mode 100644 index c081be3a..00000000 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Complex/WorldKeys/IsHungry.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 823762beb6d44813abb7e9ee7b1895bc -timeCreated: 1684230076 \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs index ef93997e..55956d3d 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleAgentBrain.cs @@ -17,19 +17,19 @@ private void Awake() private void Start() { - this.agent.SetGoal(false); + this.agent.RequestGoal(false); } private void Update() { if (this.hunger.hunger > 80) { - this.agent.SetGoal(false); + this.agent.RequestGoal(false); return; } if (this.hunger.hunger < 20) - this.agent.SetGoal(true); + this.agent.RequestGoal(true); } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs index 0b7f0bfe..7e03306c 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Behaviours/SimpleTextBehaviour.cs @@ -28,13 +28,13 @@ private void Update() private string GetText() { - if (this.actionProvider.CurrentGoal is null) + if (this.actionProvider.CurrentPlan is null) return "Idle"; - if (this.actionProvider.Agent.ActionState.Action is null) + if (this.actionProvider.Receiver.ActionState.Action is null) return "Idle"; - return $"{this.actionProvider.CurrentGoal.GetType().GetGenericTypeName()}\n{this.actionProvider.Agent.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; + return $"{this.actionProvider.CurrentPlan.Goal.GetType().GetGenericTypeName()}\n{this.actionProvider.Receiver.ActionState.Action.GetType().GetGenericTypeName()}\n{this.agent.State}\nhunger: {this.simpleHunger.hunger:0.00}"; } } } \ No newline at end of file diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs index 0805e233..f638e017 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Goap/Actions/EatAppleAction.cs @@ -35,7 +35,7 @@ public override bool IsValid(IActionReceiver agent, Data data) public override IActionRunState Perform(IMonoAgent agent, Data data, IActionContext context) { if (data.Apple == null || data.SimpleHunger == null) - return ActionRunState.Stop; + return ActionRunState.StopAndLog("Apple or SimpleHunger is null."); var eatNutrition = context.DeltaTime * 20f; diff --git a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab index bb8c0236..f237ec04 100644 --- a/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab +++ b/Demo/Assets/CrashKonijn/GOAP/Demos/Simple/Prefabs/Agent.prefab @@ -175,7 +175,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1cef53d855ccf0b46bcf004b27c4a52a, type: 3} m_Name: m_EditorClassIdentifier: - k__BackingField: {fileID: -2073804781843839524} + k__BackingField: {fileID: -2073804781843839524} k__BackingField: k__BackingField: 1 k__BackingField: 20 diff --git a/Demo/UserSettings/Layouts/default-2022.dwlt b/Demo/UserSettings/Layouts/default-2022.dwlt index ddaeffc9..e7d9782f 100644 --- a/Demo/UserSettings/Layouts/default-2022.dwlt +++ b/Demo/UserSettings/Layouts/default-2022.dwlt @@ -1,30 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &1 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_PixelRect: - serializedVersion: 2 - x: 1958 - y: 241 - width: 418 - height: 661 - m_ShowMode: 0 - m_Title: GOAP (About) - m_RootView: {fileID: 4} - m_MinSize: {x: 100, y: 121} - m_MaxSize: {x: 4000, y: 4021} - m_Maximized: 0 ---- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -38,67 +14,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 1374 + x: 3872 y: 51 - width: 2496 - height: 1381 + width: 1247 + height: 1348 m_ShowMode: 4 - m_Title: Hierarchy - m_RootView: {fileID: 5} + m_Title: Scene + m_RootView: {fileID: 2} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_Maximized: 0 ---- !u!114 &3 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: AboutEditorWindow - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 418 - height: 661 - m_MinSize: {x: 100, y: 121} - m_MaxSize: {x: 4000, y: 4021} - m_ActualView: {fileID: 17} - m_Panes: - - {fileID: 17} - m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &4 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 3} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 418 - height: 661 - m_MinSize: {x: 100, y: 121} - m_MaxSize: {x: 4000, y: 4021} - vertical: 0 - controlID: 270 ---- !u!114 &5 +--- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -111,22 +37,22 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 6} - - {fileID: 8} - - {fileID: 7} + - {fileID: 3} + - {fileID: 5} + - {fileID: 4} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 2496 - height: 1381 + width: 1247 + height: 1348 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 m_TopViewHeight: 30 m_UseBottomView: 1 m_BottomViewHeight: 20 ---- !u!114 &6 +--- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -143,12 +69,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 2496 + width: 1247 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} m_LastLoadedLayoutName: ---- !u!114 &7 +--- !u!114 &4 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -164,12 +90,12 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 1361 - width: 2496 + y: 1328 + width: 1247 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} ---- !u!114 &8 +--- !u!114 &5 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -182,19 +108,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 9} - - {fileID: 16} + - {fileID: 6} + - {fileID: 13} m_Position: serializedVersion: 2 x: 0 y: 30 - width: 2496 - height: 1331 + width: 1247 + height: 1298 m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 81 ---- !u!114 &9 + controlID: 20 +--- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -207,19 +133,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: + - {fileID: 7} - {fileID: 10} - - {fileID: 13} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 2064 - height: 1331 + width: 890 + height: 1298 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 82 ---- !u!114 &10 + controlID: 21 +--- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -232,19 +158,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 11} - - {fileID: 12} + - {fileID: 8} + - {fileID: 9} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 2064 - height: 784 + width: 890 + height: 863 m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 83 ---- !u!114 &11 + controlID: 22 +--- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -261,16 +187,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 332 - height: 784 + width: 289 + height: 863 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 18} + m_ActualView: {fileID: 14} m_Panes: - - {fileID: 18} + - {fileID: 14} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &12 +--- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -285,21 +211,21 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 332 + x: 289 y: 0 - width: 1732 - height: 784 + width: 601 + height: 863 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 19} + m_ActualView: {fileID: 15} m_Panes: - - {fileID: 19} - - {fileID: 20} - - {fileID: 21} - - {fileID: 22} + - {fileID: 15} + - {fileID: 16} + - {fileID: 17} + - {fileID: 18} m_Selected: 0 m_LastSelected: 3 ---- !u!114 &13 +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -312,19 +238,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 14} - - {fileID: 15} + - {fileID: 11} + - {fileID: 12} m_Position: serializedVersion: 2 x: 0 - y: 784 - width: 2064 - height: 547 + y: 863 + width: 890 + height: 435 m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 138 ---- !u!114 &14 + controlID: 96 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -341,16 +267,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 297 - height: 547 + width: 289 + height: 435 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 23} + m_ActualView: {fileID: 19} m_Panes: - - {fileID: 23} + - {fileID: 19} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &15 +--- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -365,18 +291,18 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 297 + x: 289 y: 0 - width: 1767 - height: 547 + width: 601 + height: 435 m_MinSize: {x: 102, y: 121} m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 24} + m_ActualView: {fileID: 20} m_Panes: - - {fileID: 24} + - {fileID: 20} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &16 +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -386,58 +312,24 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: InspectorWindow + m_Name: TestRunnerWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 2064 + x: 890 y: 0 - width: 432 - height: 1331 - m_MinSize: {x: 276, y: 121} + width: 357 + height: 1298 + m_MinSize: {x: 101, y: 121} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 25} + m_ActualView: {fileID: 22} m_Panes: - - {fileID: 25} - - {fileID: 26} - m_Selected: 0 - m_LastSelected: 1 ---- !u!114 &17 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4fbbe10524043e08052a37b57c73174, type: 3} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: GOAP (About) - m_Image: {fileID: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 1958 - y: 241 - width: 418 - height: 640 - m_SerializedDataModeController: - m_DataMode: 0 - m_PreferredDataMode: 0 - m_SupportedDataModes: - isAutomatic: 1 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 ---- !u!114 &18 + - {fileID: 21} + - {fileID: 22} + m_Selected: 1 + m_LastSelected: 0 +--- !u!114 &14 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -458,10 +350,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1374 + x: 3872 y: 81 - width: 331 - height: 763 + width: 288 + height: 842 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -475,25 +367,25 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: 50faffff - m_LastClickedID: -1456 - m_ExpandedIDs: 2afbffff + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: 1c62fdffd263fdff4866fdff7868fdffe269fdff346cfdff806efdffe06ffdff4071fdffba72fdff6074fdffd875fdfff278fdff107efdff3683fdffa684fdfff886fdff6088fdffc889fdff328bfdff988cfdfffa8dfdff8090fdffa89afdff1a9dfdff00d7fdff56e8fdffd444feff1247feffdc49feff844cfeff4e4ffeff6451feff4853feff7257feff3076ffffaab9ffff26baffff66baffffa8beffffdac3ffff26c4ffff90c8ffff80cdffffcccdffff36d2ffff7ed9ffff22ddffffc8e3ffff6ae7ffffb6e7ffff52eeffff2af5ffff m_RenameOverlay: m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: + m_Name: Miner -37644 + m_OriginalName: Miner -37644 m_EditFieldRect: serializedVersion: 2 x: 0 y: 0 width: 0 height: 0 - m_UserData: 0 + m_UserData: -37640 m_IsWaitingForDelay: 0 m_IsRenaming: 0 - m_OriginalEventType: 11 + m_OriginalEventType: 0 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} + m_ClientGUIView: {fileID: 8} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -501,7 +393,7 @@ MonoBehaviour: m_IsLocked: 0 m_CurrentSortingName: TransformSorting m_WindowGUID: 4c969a2b90040154d917609493e03593 ---- !u!114 &19 +--- !u!114 &15 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -522,10 +414,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1706 + x: 4161 y: 81 - width: 1730 - height: 763 + width: 599 + height: 842 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -806,9 +698,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 0.3697176, y: -2.7942476, z: -2.124469} + m_Target: {x: 1.706177, y: -2.415698, z: 0.55057496} speed: 2 - m_Value: {x: 0.3697176, y: -2.7942476, z: -2.124469} + m_Value: {x: 1.706177, y: -2.415698, z: 0.55057496} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -854,13 +746,13 @@ MonoBehaviour: m_GridAxis: 1 m_gridOpacity: 0.5 m_Rotation: - m_Target: {x: -0.65238446, y: 0.00079717074, z: -0.0008451086, w: -0.75796276} + m_Target: {x: -0.6869069, y: -0.0036004402, z: 0.0032439346, w: -0.7268122} speed: 2 - m_Value: {x: -0.65238446, y: 0.00079717074, z: -0.0008451086, w: -0.75796276} + m_Value: {x: -0.6868655, y: -0.0036002235, z: 0.0032437393, w: -0.72676843} m_Size: - m_Target: 8.3279295 + m_Target: 9.139201 speed: 2 - m_Value: 8.3279295 + m_Value: 9.139201 m_Ortho: m_Target: 0 speed: 2 @@ -885,7 +777,7 @@ MonoBehaviour: m_SceneVisActive: 1 m_LastLockedObject: {fileID: 0} m_ViewIsLockedToObject: 0 ---- !u!114 &20 +--- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -906,10 +798,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 255 - y: 73 - width: 1796 - height: 884 + x: 4018 + y: 81 + width: 698 + height: 869 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -920,7 +812,7 @@ MonoBehaviour: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 - m_Recording: 1 + m_Recording: 0 m_ActiveNativePlatformSupportModuleName: m_AllModules: - rid: 6854166477879902208 @@ -956,10 +848,10 @@ MonoBehaviour: m_FrameDataHierarchyView: m_Serialized: 1 m_TreeViewState: - scrollPos: {x: 0, y: 0} + scrollPos: {x: 0, y: 48} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 010000002d0000002f00000033000000350000003a0000003c000000400000004200000047000000490000004d0000004f00000054000000560000005a0000005c000000610000006300000067000000690000006e0000007000000074000000760000007b0000007d0000008100000083000000880000008a0000008e0000009000000095000000970000009b0000009d000000a2000000a4000000a8000000aa000000af000000b1000000b5000000b7000000bc000000be000000c2000000c4000000c9000000cb000000cf000000d1000000d6000000d8000000dc000000de000000e3000000e5000000e9000000eb000000f0000000f2000000f6000000f8000000 + m_ExpandedIDs: 01000000040000003c000000420000004d0000005c000000610000007a000000d2000000db000000fe000000dd010000e9010000f6010000200200002602000034020000390200004302000047020000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -979,7 +871,7 @@ MonoBehaviour: m_SearchString: m_MultiColumnHeaderState: m_Columns: - - width: 310 + - width: 200 sortedAscending: 1 headerContent: m_Text: Overview @@ -1105,22 +997,22 @@ MonoBehaviour: m_ThreadIndexInThreadNames: 0 m_DetailedViewType: 1 m_DetailedViewSpliterState: - ID: 469 - splitterInitialOffset: 579 + ID: 11365 + splitterInitialOffset: 847 currentActiveSplitter: -1 realSizes: - - 1290 - - 506 + - 450 + - 66 relativeSizes: - - 0.71801245 - - 0.28198755 + - 0.6841257 + - 0.31587428 minSizes: - 450 - 50 maxSizes: - 0 - 0 - lastTotalSize: 1796 + lastTotalSize: 516 splitSize: 6 xOffset: 0 m_Version: 1 @@ -1129,7 +1021,7 @@ MonoBehaviour: oldMaxSizes: oldSplitSize: 0 m_DetailedObjectsView: - m_SelectedID: 4 + m_SelectedID: 65 m_TreeViewState: scrollPos: {x: 0, y: 0} m_SelectedIDs: 00000000 @@ -1217,12 +1109,12 @@ MonoBehaviour: m_VisibleColumns: 00000000010000000200000003000000 m_SortedColumns: 03000000 m_VertSplit: - ID: 780 + ID: 11463 splitterInitialOffset: 0 currentActiveSplitter: -1 realSizes: - - 258 - - 111 + - 257 + - 110 relativeSizes: - 0.7 - 0.3 @@ -1232,7 +1124,7 @@ MonoBehaviour: maxSizes: - 0 - 0 - lastTotalSize: 369 + lastTotalSize: 367 splitSize: 6 xOffset: 0 m_Version: 1 @@ -1474,7 +1366,7 @@ MonoBehaviour: m_SortedColumns: 03000000 m_FullThreadName: Main Thread m_ThreadName: Main Thread - k__BackingField: 4452 + k__BackingField: 55384 k__BackingField: 0 m_GroupName: - rid: 6854166477879902209 @@ -1925,7 +1817,7 @@ MonoBehaviour: data: m_SortAscending: 0 m_SortedColumn: -1 ---- !u!114 &21 +--- !u!114 &17 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2032,7 +1924,7 @@ MonoBehaviour: m_CurrentEditor: 0 m_LayerEditor: m_SelectedLayerIndex: 0 ---- !u!114 &22 +--- !u!114 &18 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2053,10 +1945,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1664 + x: 4158 y: 81 - width: 1500 - height: 767 + width: 589 + height: 869 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -2073,7 +1965,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1326, y: 746} + m_TargetSize: {x: 589, y: 331} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -2088,10 +1980,10 @@ MonoBehaviour: m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -663 - m_HBaseRangeMax: 663 - m_VBaseRangeMin: -373 - m_VBaseRangeMax: 373 + m_HBaseRangeMin: -294.5 + m_HBaseRangeMax: 294.5 + m_VBaseRangeMin: -165.5 + m_VBaseRangeMax: 165.5 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -2109,29 +2001,29 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1500 - height: 746 + width: 589 + height: 848 m_Scale: {x: 1, y: 1} - m_Translation: {x: 750, y: 373} + m_Translation: {x: 294.5, y: 424} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -750 - y: -373 - width: 1500 - height: 746 + x: -294.5 + y: -424 + width: 589 + height: 848 m_MinimalGUI: 1 m_defaultScale: 1 - m_LastWindowPixelSize: {x: 1500, y: 767} + m_LastWindowPixelSize: {x: 589, y: 869} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 m_XRRenderMode: 0 m_RenderTexture: {fileID: 0} ---- !u!114 &23 +--- !u!114 &19 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2152,10 +2044,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1374 - y: 865 - width: 296 - height: 526 + x: 3872 + y: 944 + width: 288 + height: 414 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -2179,7 +2071,7 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/CrashKonijn/GOAP/Demos/Simple/Goap + - Assets/CrashKonijn/GOAP/Demos/Complex/Prefabs m_Globs: [] m_OriginalText: m_ImportLogFlags: 0 @@ -2194,7 +2086,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: 88b50000 m_LastClickedID: 46472 - m_ExpandedIDs: 00000000d8710000da710000587200005a7200005c7200005e72000060720000627200006472000066720000687200006a7200006c7200006e72000070720000727200007472000076720000787200007a7200007c7200007e72000080720000827200008472000086720000887200008a7200008c7200008e72000090720000927200009472000096720000987200009a7200009c7200009e720000a0720000a2720000a4720000a6720000a8720000aa720000ac720000ae720000b0720000b2720000b4720000b6720000b8720000ba720000bc720000be720000c0720000c2720000c4720000c6720000c8720000ca720000cc720000ce720000d0720000d2720000d4720000d6720000d8720000da720000 + m_ExpandedIDs: 000000001475000016750000187500001a7500001c7500001e75000020750000227500002475000026750000287500002a7500002c7500002e75000030750000327500003475000036750000387500003a7500003c7500003e75000040750000427500004475000046750000487500004a7500004c7500004e75000050750000527500005475000056750000587500005a7500005c7500005e75000060750000627500006475000066750000687500006a7500006c7500006e75000070750000727500007475000076750000787500007a7500007c7500007e75000080750000827500008475000086750000887500008a7500008c7500008e75000090750000927500009475000096750000987500009a750000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2219,10 +2111,10 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_AssetTreeState: - scrollPos: {x: 0, y: 349} + scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: ffffffff00000000d8710000da710000587200005a7200005c7200005e72000060720000627200006472000066720000687200006a7200006c7200006e72000070720000727200007472000076720000787200007a7200007c7200007e72000080720000827200008472000086720000887200008a7200008c7200008e72000090720000927200009472000096720000987200009a7200009c7200009e720000a0720000a2720000a4720000a6720000a8720000aa720000ac720000ae720000b0720000b2720000b4720000b6720000b8720000ba720000bc720000be720000c0720000c2720000c4720000c6720000c8720000ca720000cc720000ce720000d0720000d2720000d4720000d6720000d8720000da720000 + m_ExpandedIDs: ffffffff000000001475000016750000187500001a7500001c7500001e75000020750000227500002475000026750000287500002a7500002c7500002e750000307500003475000036750000387500003a7500003c7500003e75000040750000427500004475000046750000487500004a7500004c7500004e75000050750000527500005475000056750000587500005a7500005c7500005e75000060750000627500006475000066750000687500006a7500006c7500006e75000070750000727500007475000076750000787500007a7500007c7500007e75000080750000827500008475000086750000887500008a7500008c7500008e75000090750000927500009475000096750000987500009a750000c8750000ea750000fc75000000760000a8bb00003cbc000046bc0000ffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -2238,7 +2130,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 14} + m_ClientGUIView: {fileID: 11} m_SearchString: m_CreateAssetUtility: m_EndAction: {fileID: 0} @@ -2278,7 +2170,7 @@ MonoBehaviour: m_GridSize: 64 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 207 ---- !u!114 &24 +--- !u!114 &20 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2299,10 +2191,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1671 - y: 865 - width: 1765 - height: 526 + x: 4161 + y: 944 + width: 599 + height: 414 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -2313,7 +2205,7 @@ MonoBehaviour: m_LastAppliedPresetName: Default m_SaveData: [] m_OverlaysVisible: 1 ---- !u!114 &25 +--- !u!114 &21 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2334,10 +2226,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 3438 + x: 4749 y: 81 - width: 431 - height: 1310 + width: 369 + height: 1317 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -2361,7 +2253,7 @@ MonoBehaviour: m_LockTracker: m_IsLocked: 0 m_PreviewWindow: {fileID: 0} ---- !u!114 &26 +--- !u!114 &22 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -2381,10 +2273,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 4173 - y: 73 - width: 946 - height: 1286 + x: 4762 + y: 81 + width: 356 + height: 1277 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -2396,12 +2288,12 @@ MonoBehaviour: m_SaveData: [] m_OverlaysVisible: 1 m_Spl: - ID: 3747 + ID: 268 splitterInitialOffset: 576 currentActiveSplitter: -1 realSizes: - - 508 - - 708 + - 504 + - 703 relativeSizes: - 0.41776314 - 0.5822369 @@ -2411,7 +2303,7 @@ MonoBehaviour: maxSizes: - 0 - 0 - lastTotalSize: 1216 + lastTotalSize: 1207 splitSize: 6 xOffset: 0 m_Version: 1 @@ -2419,17 +2311,17 @@ MonoBehaviour: oldMinSizes: oldMaxSizes: oldSplitSize: 0 - m_TestTypeToolbarIndex: 0 + m_TestTypeToolbarIndex: 1 m_PlayModeTestListGUI: - m_Window: {fileID: 26} + m_Window: {fileID: 22} m_NewResultList: - id: 1025 uniqueId: '[UnityGoap][suite]' name: UnityGoap fullName: UnityGoap - resultStatus: 1 - duration: 1.379472 - messages: + resultStatus: 2 + duration: 0.2014367 + messages: One or more child tests had errors output: stacktrace: notRunnable: 0 @@ -2443,9 +2335,9 @@ MonoBehaviour: uniqueId: '[Tests.dll][suite]' name: Tests.dll fullName: E:/Development/CrashKonijn/GOAP/Demo/Library/ScriptAssemblies/Tests.dll - resultStatus: 1 - duration: 1.3597783 - messages: + resultStatus: 2 + duration: 0.1863727 + messages: One or more child tests had errors output: stacktrace: notRunnable: 0 @@ -2459,9 +2351,9 @@ MonoBehaviour: uniqueId: Tests.dll/[Tests][suite] name: Tests fullName: Tests - resultStatus: 1 - duration: 1.3533863 - messages: + resultStatus: 2 + duration: 0.1840004 + messages: One or more child tests had errors output: stacktrace: notRunnable: 0 @@ -2475,9 +2367,9 @@ MonoBehaviour: uniqueId: Tests.dll/Tests/[Tests][Tests.PlayMode][suite] name: PlayMode fullName: Tests.PlayMode - resultStatus: 1 - duration: 1.3454015 - messages: + resultStatus: 2 + duration: 0.1822583 + messages: One or more child tests had errors output: stacktrace: notRunnable: 0 @@ -2492,7 +2384,7 @@ MonoBehaviour: name: ComplexSceneTests fullName: Tests.PlayMode.ComplexSceneTests resultStatus: 1 - duration: 1.3369509 + duration: 0.5347375 messages: output: stacktrace: @@ -2508,7 +2400,7 @@ MonoBehaviour: name: ComplexDemoScene_RunsFor100FramesWithoutErrors fullName: Tests.PlayMode.ComplexSceneTests.ComplexDemoScene_RunsFor100FramesWithoutErrors resultStatus: 1 - duration: 1.3094255 + duration: 0.5222928 messages: output: stacktrace: @@ -2524,9 +2416,9 @@ MonoBehaviour: uniqueId: Tests.dll/Tests/PlayMode/[Tests][Tests.PlayMode.SimpleSceneTests][suite] name: SimpleSceneTests fullName: Tests.PlayMode.SimpleSceneTests - resultStatus: 1 - duration: 1.6795161 - messages: + resultStatus: 2 + duration: 0.1792561 + messages: One or more child tests had errors output: stacktrace: notRunnable: 0 @@ -2540,11 +2432,123 @@ MonoBehaviour: uniqueId: Tests.dll/Tests/PlayMode/SimpleSceneTests/[Tests][Tests.PlayMode.SimpleSceneTests.SimpleDemoScene_RunsFor100FramesWithoutErrors] name: SimpleDemoScene_RunsFor100FramesWithoutErrors fullName: Tests.PlayMode.SimpleSceneTests.SimpleDemoScene_RunsFor100FramesWithoutErrors - resultStatus: 1 - duration: 1.653019 - messages: - output: - stacktrace: + resultStatus: 2 + duration: 0.1680236 + messages: 'Unhandled log message: ''[Exception] MissingReferenceException: + The object of type ''CapabilityConfigScriptable'' has been destroyed but + you are still trying to access it. + + Your script should either check + if it is null or you should not destroy the object.''. Use UnityEngine.TestTools.LogAssert.Expect' + output: 'Fixing reference to the runtime script in scene file! + + MissingReferenceException: + The object of type ''CapabilityConfigScriptable'' has been destroyed but + you are still trying to access it. + + Your script should either check + if it is null or you should not destroy the object. + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + + NullReferenceException: + Object reference not set to an instance of an object + +' + stacktrace: 'UnityEngine.Object.get_name () (at <0ae5d4e782f74095b2c8d38f4225786f>:0) + + CrashKonijn.Goap.Scriptables.CapabilityConfigScriptable.Create + () (at E:/Development/CrashKonijn/GOAP/Package/Runtime/CrashKonijn.Goap/Scriptables/CapabilityConfigScriptable.cs:25) + + CrashKonijn.Goap.Scriptables.AgentTypeScriptable+<>c.b__3_0 + (CrashKonijn.Goap.Classes.ScriptableCapabilityFactoryBase behaviour) (at + E:/Development/CrashKonijn/GOAP/Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs:22) + + System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].ToList + () (at :0) + + System.Linq.Enumerable.ToList[TSource] + (System.Collections.Generic.IEnumerable`1[T] source) (at :0) + + CrashKonijn.Goap.Scriptables.AgentTypeScriptable.Create + () (at E:/Development/CrashKonijn/GOAP/Package/Runtime/CrashKonijn.Goap/Scriptables/AgentTypeScriptable.cs:21) + + CrashKonijn.Goap.Behaviours.AgentTypeBehaviour.Awake + () (at E:/Development/CrashKonijn/GOAP/Package/Runtime/CrashKonijn.Goap/Behaviours/AgentTypeBehaviour.cs:22) + + + +' notRunnable: 0 ignoredOrSkipped: 0 description: @@ -2553,12 +2557,17 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: Tests.dll/Tests/PlayMode/[Tests][Tests.PlayMode.SimpleSceneTests][suite] - m_ResultText: ComplexDemoScene_RunsFor100FramesWithoutErrors (1.309s) + m_ResultText: 'SimpleSceneTests (0.179s) + + --- + + One or more child + tests had errors' m_ResultStacktrace: m_TestListState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: efd39e60 - m_LastClickedID: 1621021679 + m_SelectedIDs: 12cb9c30 + m_LastClickedID: 815581970 m_ExpandedIDs: 4481da83e557abf7bf0db9fa12cb9c308359db41f887fc56ffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 @@ -2587,14 +2596,14 @@ MonoBehaviour: - Uncategorized m_SelectedOption: 0 m_EditModeTestListGUI: - m_Window: {fileID: 26} + m_Window: {fileID: 22} m_NewResultList: - id: 1000 uniqueId: '[UnityGoap][suite]' name: UnityGoap fullName: UnityGoap resultStatus: 1 - duration: 0.5470988 + duration: 1.3142658 messages: output: stacktrace: @@ -2610,7 +2619,7 @@ MonoBehaviour: name: UnitTests.dll fullName: E:/Development/CrashKonijn/GOAP/Demo/Library/ScriptAssemblies/UnitTests.dll resultStatus: 1 - duration: 0.5113342 + duration: 1.2633266 messages: output: stacktrace: @@ -2626,7 +2635,7 @@ MonoBehaviour: name: CrashKonijn fullName: CrashKonijn resultStatus: 1 - duration: 0.5108406 + duration: 1.2600807 messages: output: stacktrace: @@ -2642,7 +2651,7 @@ MonoBehaviour: name: Goap fullName: CrashKonijn.Goap resultStatus: 1 - duration: 0.5106253 + duration: 1.2597406 messages: output: stacktrace: @@ -2658,7 +2667,7 @@ MonoBehaviour: name: UnitTests fullName: CrashKonijn.Goap.UnitTests resultStatus: 1 - duration: 0.5080247 + duration: 1.2576787 messages: output: stacktrace: @@ -2669,12 +2678,12 @@ MonoBehaviour: categories: [] parentId: 1020 parentUniqueId: UnitTests.dll/CrashKonijn/[Goap][suite] - - id: 1001 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - name: AgentBehaviourTests - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests + - id: 1010 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + name: ActionRunnerTests + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests resultStatus: 1 - duration: 0.2265496 + duration: 0.3479818 messages: output: stacktrace: @@ -2683,14 +2692,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1056 + parentId: 1140 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] - - id: 1008 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.ActionPerform_WithRunStateStop_CallsEnd] - name: ActionPerform_WithRunStateStop_CallsEnd - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.ActionPerform_WithRunStateStop_CallsEnd + - id: 1014 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenInRange_ShouldPerformAction] + name: MoveBeforePerforming_WhenInRange_ShouldPerformAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenInRange_ShouldPerformAction resultStatus: 1 - duration: 0.1516988 + duration: 0.2960793 messages: output: stacktrace: @@ -2700,14 +2709,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1026 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsActionEndEvent] - name: EndAction_CallsActionEndEvent - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsActionEndEvent + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1013 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenInRange_ShouldSetMoveStateToInRange] + name: MoveBeforePerforming_WhenInRange_ShouldSetMoveStateToInRange + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenInRange_ShouldSetMoveStateToInRange resultStatus: 1 - duration: 0.0071621 + duration: 0.0021252 messages: output: stacktrace: @@ -2717,14 +2726,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1022 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsEndOnAction] - name: EndAction_CallsEndOnAction - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsEndOnAction + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1012 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenInRange_ShouldSetStateToPerformingAction] + name: MoveBeforePerforming_WhenInRange_ShouldSetStateToPerformingAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenInRange_ShouldSetStateToPerformingAction resultStatus: 1 - duration: 0.0101377 + duration: 0.0017134 messages: output: stacktrace: @@ -2734,14 +2743,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1023 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsAction] - name: EndAction_ClearsAction - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsAction + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1017 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRange_ShouldMove] + name: MoveBeforePerforming_WhenNotInRange_ShouldMove + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRange_ShouldMove resultStatus: 1 - duration: 0.0104628 + duration: 0.0037853 messages: output: stacktrace: @@ -2751,14 +2760,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1024 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsActionData] - name: EndAction_ClearsActionData - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsActionData + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1016 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRange_ShouldSetMoveStateToOutOfRange] + name: MoveBeforePerforming_WhenNotInRange_ShouldSetMoveStateToOutOfRange + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRange_ShouldSetMoveStateToOutOfRange resultStatus: 1 - duration: 0.0006871 + duration: 0.0021835 messages: output: stacktrace: @@ -2768,14 +2777,302 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1015 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRange_ShouldSetStateToMovingToTarget] + name: MoveBeforePerforming_WhenNotInRange_ShouldSetStateToMovingToTarget + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRange_ShouldSetStateToMovingToTarget + resultStatus: 1 + duration: 0.0022471 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1018 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRangeAndStateIsPerformingAction_ShouldNotSetStateToMovingToTarget] + name: MoveBeforePerforming_WhenNotInRangeAndStateIsPerformingAction_ShouldNotSetStateToMovingToTarget + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.MoveBeforePerforming_WhenNotInRangeAndStateIsPerformingAction_ShouldNotSetStateToMovingToTarget + resultStatus: 1 + duration: 0.0033358 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1028 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ContinueRunState_ShouldPerformAction] + name: PerformAction_ContinueRunState_ShouldPerformAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ContinueRunState_ShouldPerformAction + resultStatus: 1 + duration: 0.0038878 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1026 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_IsCompletedRunState_ShouldNotPerformAction] + name: PerformAction_IsCompletedRunState_ShouldNotPerformAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_IsCompletedRunState_ShouldNotPerformAction + resultStatus: 1 + duration: 0.0022375 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] - id: 1025 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ShouldEnqueueAgent] - name: EndAction_ShouldEnqueueAgent - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ShouldEnqueueAgent + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_NoRunState_ShouldPerformAction] + name: PerformAction_NoRunState_ShouldPerformAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_NoRunState_ShouldPerformAction + resultStatus: 1 + duration: 0.0017348 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1029 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ReturnedCompleteState_ShouldCompleteAction] + name: PerformAction_ReturnedCompleteState_ShouldCompleteAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ReturnedCompleteState_ShouldCompleteAction + resultStatus: 1 + duration: 0.0016564 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1031 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ReturnedContinueState_ShouldContinueAction] + name: PerformAction_ReturnedContinueState_ShouldContinueAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ReturnedContinueState_ShouldContinueAction + resultStatus: 1 + duration: 0.0021358 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1030 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ReturnedStopState_ShouldStopAction] + name: PerformAction_ReturnedStopState_ShouldStopAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ReturnedStopState_ShouldStopAction + resultStatus: 1 + duration: 0.0017415 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1027 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ShouldStopRunState_ShouldNotPerformAction] + name: PerformAction_ShouldStopRunState_ShouldNotPerformAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformAction_ShouldStopRunState_ShouldNotPerformAction + resultStatus: 1 + duration: 0.0016068 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1021 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenInRange_ShouldPerformAction] + name: PerformWhileMoving_WhenInRange_ShouldPerformAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenInRange_ShouldPerformAction + resultStatus: 1 + duration: 0.0015968 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1020 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenInRange_ShouldSetMoveStateToInRange] + name: PerformWhileMoving_WhenInRange_ShouldSetMoveStateToInRange + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenInRange_ShouldSetMoveStateToInRange + resultStatus: 1 + duration: 0.0015023 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1019 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenInRange_ShouldSetStateToPerformingAction] + name: PerformWhileMoving_WhenInRange_ShouldSetStateToPerformingAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenInRange_ShouldSetStateToPerformingAction + resultStatus: 1 + duration: 0.0015958 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1024 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenNotInRange_ShouldMove] + name: PerformWhileMoving_WhenNotInRange_ShouldMove + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenNotInRange_ShouldMove + resultStatus: 1 + duration: 0.0017312 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1023 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenNotInRange_ShouldSetMoveStateToOutOfRange] + name: PerformWhileMoving_WhenNotInRange_ShouldSetMoveStateToOutOfRange + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenNotInRange_ShouldSetMoveStateToOutOfRange + resultStatus: 1 + duration: 0.0016544 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1022 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenNotInRange_ShouldSetStateToMovingWhilePerformingAction] + name: PerformWhileMoving_WhenNotInRange_ShouldSetStateToMovingWhilePerformingAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.PerformWhileMoving_WhenNotInRange_ShouldSetStateToMovingWhilePerformingAction + resultStatus: 1 + duration: 0.0016282 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1011 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ActionRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests.Run_WhenRunIsNotValid_ShouldStopAction] + name: Run_WhenRunIsNotValid_ShouldStopAction + fullName: CrashKonijn.Goap.UnitTests.ActionRunnerTests.Run_WhenRunIsNotValid_ShouldStopAction + resultStatus: 1 + duration: 0.0011876 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1010 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ActionRunnerTests][suite] + - id: 1001 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + name: AgentBehaviourTests + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests + resultStatus: 1 + duration: 0.1905065 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1056 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1008 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.ActionPerform_WithRunStateStop_CallsEnd] + name: ActionPerform_WithRunStateStop_CallsEnd + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.ActionPerform_WithRunStateStop_CallsEnd resultStatus: 1 - duration: 0.0005458 + duration: 0.0913159 messages: output: stacktrace: @@ -2787,12 +3084,12 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1003 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnDisable_CallsUnregister] - name: OnDisable_CallsUnregister - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnDisable_CallsUnregister + - id: 1026 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsActionEndEvent] + name: EndAction_CallsActionEndEvent + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsActionEndEvent resultStatus: 1 - duration: 0.0012304 + duration: 0.0031977 messages: output: stacktrace: @@ -2804,12 +3101,12 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1002 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnEnable_CallsRegister] - name: OnEnable_CallsRegister - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnEnable_CallsRegister + - id: 1022 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsEndOnAction] + name: EndAction_CallsEndOnAction + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_CallsEndOnAction resultStatus: 1 - duration: 0.0005916 + duration: 0.0041442 messages: output: stacktrace: @@ -2821,12 +3118,12 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1006 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithActionAndTooMuchDistance_CallsMover] - name: Run_WithActionAndTooMuchDistance_CallsMover - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithActionAndTooMuchDistance_CallsMover + - id: 1023 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsAction] + name: EndAction_ClearsAction + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsAction resultStatus: 1 - duration: 0.0020314 + duration: 0.0066154 messages: output: stacktrace: @@ -2838,12 +3135,12 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1005 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithActionAndTooMuchDistance_SetsStateToMovingToTarget] - name: Run_WithActionAndTooMuchDistance_SetsStateToMovingToTarget - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithActionAndTooMuchDistance_SetsStateToMovingToTarget + - id: 1024 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsActionData] + name: EndAction_ClearsActionData + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ClearsActionData resultStatus: 1 - duration: 0.0013268 + duration: 0.0021393 messages: output: stacktrace: @@ -2855,12 +3152,29 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1007 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithCloseAction_CallsActionPerform] - name: Run_WithCloseAction_CallsActionPerform - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithCloseAction_CallsActionPerform + - id: 1052 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ShouldResolveAgent] + name: EndAction_ShouldResolveAgent + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.EndAction_ShouldResolveAgent + resultStatus: 1 + duration: 0.0104492 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1032 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1003 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnDisable_CallsUnregister] + name: OnDisable_CallsUnregister + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnDisable_CallsUnregister resultStatus: 1 - duration: 0.0007587 + duration: 0.0020884 messages: output: stacktrace: @@ -2872,12 +3186,12 @@ MonoBehaviour: - Uncategorized parentId: 1001 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1004 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithoutAction_SetsStateToNoAction] - name: Run_WithoutAction_SetsStateToNoAction - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.Run_WithoutAction_SetsStateToNoAction + - id: 1002 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnEnable_CallsRegister] + name: OnEnable_CallsRegister + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.OnEnable_CallsRegister resultStatus: 1 - duration: 0.0002125 + duration: 0.0012062 messages: output: stacktrace: @@ -2894,7 +3208,7 @@ MonoBehaviour: name: SetAction_CallsActionStartEvent fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_CallsActionStartEvent resultStatus: 1 - duration: 0.0006887 + duration: 0.0019718 messages: output: stacktrace: @@ -2911,7 +3225,7 @@ MonoBehaviour: name: SetAction_CallsEndOnOldAction fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_CallsEndOnOldAction resultStatus: 1 - duration: 0.0007427 + duration: 0.0023184 messages: output: stacktrace: @@ -2928,7 +3242,7 @@ MonoBehaviour: name: SetAction_CallsGetData fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_CallsGetData resultStatus: 1 - duration: 0.0004732 + duration: 0.0019195 messages: output: stacktrace: @@ -2945,7 +3259,817 @@ MonoBehaviour: name: SetAction_CallsStartOnAction fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_CallsStartOnAction resultStatus: 1 - duration: 0.0004763 + duration: 0.0016947 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1014 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_SetsAction] + name: SetAction_SetsAction + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_SetsAction + resultStatus: 1 + duration: 0.0017767 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1017 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresData] + name: SetAction_StoresData + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresData + resultStatus: 1 + duration: 0.0018814 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1020 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresPath] + name: SetAction_StoresPath + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresPath + resultStatus: 1 + duration: 0.0027776 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1011 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_CallsGoalStartEvent] + name: SetGoal_CallsGoalStartEvent + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_CallsGoalStartEvent + resultStatus: 1 + duration: 0.0190314 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1012 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionFalse_DoesntCallEnd] + name: SetGoal_EndActionFalse_DoesntCallEnd + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionFalse_DoesntCallEnd + resultStatus: 1 + duration: 0.0013796 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1013 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionTrue_DoesCallEnd] + name: SetGoal_EndActionTrue_DoesCallEnd + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionTrue_DoesCallEnd + resultStatus: 1 + duration: 0.0012173 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1037 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_ResolvesAgent] + name: SetGoal_ResolvesAgent + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_ResolvesAgent + resultStatus: 1 + duration: 0.0008814 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1032 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1009 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_SetsGoal] + name: SetGoal_SetsGoal + fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_SetsGoal + resultStatus: 1 + duration: 0.0138882 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1001 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] + - id: 1054 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + name: AgentTypeJobRunnerTests + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests + resultStatus: 1 + duration: 0.1469312 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1140 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1061 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCompletedGoal_CallsGoalCompleteEvent] + name: Run_AgentHasCompletedGoal_CallsGoalCompleteEvent + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCompletedGoal_CallsGoalCompleteEvent + resultStatus: 1 + duration: 0.0728463 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1064 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet] + name: Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet + resultStatus: 1 + duration: 0.0088363 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1060 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndDoesHaveAction_Runs] + name: Run_AgentHasCurrentGoalAndDoesHaveAction_Runs + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndDoesHaveAction_Runs + resultStatus: 1 + duration: 0.0033941 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1059 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndNoAction_Runs] + name: Run_AgentHasCurrentGoalAndNoAction_Runs + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndNoAction_Runs + resultStatus: 1 + duration: 0.0035087 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1063 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent] + name: Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent + resultStatus: 1 + duration: 0.0036142 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1058 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasNoCurrentGoal_DoesNotRun] + name: Run_AgentHasNoCurrentGoal_DoesNotRun + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasNoCurrentGoal_DoesNotRun + resultStatus: 1 + duration: 0.0028027 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1062 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent] + name: Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent + resultStatus: 1 + duration: 0.0044603 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1055 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_UpdatesSensorRunner] + name: Run_UpdatesSensorRunner + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_UpdatesSensorRunner + resultStatus: 1 + duration: 0.002507 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1057 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_WithAtLeastOneAgent_SensesGlobalSensors] + name: Run_WithAtLeastOneAgent_SensesGlobalSensors + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_WithAtLeastOneAgent_SensesGlobalSensors + resultStatus: 1 + duration: 0.0018862 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1056 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentTypeJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_WithNoAgens_SensesGlobalSensors] + name: Run_WithNoAgens_SensesGlobalSensors + fullName: CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests.Run_WithNoAgens_SensesGlobalSensors + resultStatus: 1 + duration: 0.0014934 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1054 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentTypeJobRunnerTests][suite] + - id: 1016 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] + name: ClassResolverTests + fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests + resultStatus: 1 + duration: 0.1099352 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1021 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1017 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ClassResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsGoal] + name: Load_LoadsGoal + fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsGoal + resultStatus: 1 + duration: 0.0616733 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1016 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] + - id: 1018 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ClassResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsTargetSensorConfig] + name: Load_LoadsTargetSensorConfig + fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsTargetSensorConfig + resultStatus: 1 + duration: 0.0127827 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1016 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] + - id: 1019 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ClassResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsWorldSensorConfig] + name: Load_LoadsWorldSensorConfig + fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsWorldSensorConfig + resultStatus: 1 + duration: 0.0143023 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1016 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] + - id: 1005 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] + name: ConditionObserverTests + fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests + resultStatus: 1 + duration: 0.0259113 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1027 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1009 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsNotPresent] + name: IsMet_Negative_IsNotPresent + fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsNotPresent + resultStatus: 1 + duration: 0.0101083 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1005 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] + - id: 1008 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsPresent] + name: IsMet_Negative_IsPresent + fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsPresent + resultStatus: 1 + duration: 0.0008926 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1005 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] + - id: 1007 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsNotPresent] + name: IsMet_Positive_IsNotPresent + fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsNotPresent + resultStatus: 1 + duration: 0.0002655 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1005 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] + - id: 1006 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsPresent] + name: IsMet_Positive_IsPresent + fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsPresent + resultStatus: 1 + duration: 0.0005608 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1005 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] + - id: 1014 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + name: GraphResolverTests + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests + resultStatus: 1 + duration: 0.0490186 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1038 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1091 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex][suite] + name: Resolve_Should_HandleMultipleStartIndex + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex + resultStatus: 1 + duration: 0.0049061 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1089 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/Resolve_Should_HandleMultipleStartIndex/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex(True)] + name: Resolve_Should_HandleMultipleStartIndex(True) + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex(True) + resultStatus: 1 + duration: 0.0028498 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1091 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex][suite] + - id: 1090 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/Resolve_Should_HandleMultipleStartIndex/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex(False)] + name: Resolve_Should_HandleMultipleStartIndex(False) + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex(False) + resultStatus: 1 + duration: 0.0013093 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1091 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_HandleMultipleStartIndex][suite] + - id: 1088 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_UseDistanceCorrectly] + name: Resolve_Should_UseDistanceCorrectly + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_UseDistanceCorrectly + resultStatus: 1 + duration: 0.0011901 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1092 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_UseUnmetConditionsInHeuristics] + name: Resolve_Should_UseUnmetConditionsInHeuristics + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_Should_UseUnmetConditionsInHeuristics + resultStatus: 1 + duration: 0.0015835 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1042 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeCostHeuristics] + name: Resolve_ShouldIncludeCostHeuristics + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeCostHeuristics + resultStatus: 1 + duration: 0.0014919 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1036 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1019 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeLocationHeuristics] + name: Resolve_ShouldIncludeLocationHeuristics + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeLocationHeuristics + resultStatus: 1 + duration: 0.001396 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1014 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1085 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_ActionWithFalseConditionWithoutConnections] + name: Resolve_ShouldNotResolve_ActionWithFalseConditionWithoutConnections + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_ActionWithFalseConditionWithoutConnections + resultStatus: 1 + duration: 0.0011576 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1087 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_ChildOfDisabledAction] + name: Resolve_ShouldNotResolve_ChildOfDisabledAction + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_ChildOfDisabledAction + resultStatus: 1 + duration: 0.0013308 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1084 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_CompletedCondition] + name: Resolve_ShouldNotResolve_CompletedCondition + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_CompletedCondition + resultStatus: 1 + duration: 0.0011213 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1086 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_DisabledAction] + name: Resolve_ShouldNotResolve_DisabledAction + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldNotResolve_DisabledAction + resultStatus: 1 + duration: 0.0012692 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1083 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier][suite] + name: Resolve_ShouldUseDistanceMultiplier + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier + resultStatus: 1 + duration: 0.0137348 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1074 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1081 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/Resolve_ShouldUseDistanceMultiplier/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier(True)] + name: Resolve_ShouldUseDistanceMultiplier(True) + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier(True) + resultStatus: 1 + duration: 0.0018729 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1083 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier][suite] + - id: 1082 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/Resolve_ShouldUseDistanceMultiplier/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier(False)] + name: Resolve_ShouldUseDistanceMultiplier(False) + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier(False) + resultStatus: 1 + duration: 0.0016869 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1083 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldUseDistanceMultiplier][suite] + - id: 1017 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithMultipleConnections_ReturnsExecutableAction] + name: Resolve_WithMultipleConnections_ReturnsExecutableAction + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithMultipleConnections_ReturnsExecutableAction + resultStatus: 1 + duration: 0.0012356 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1014 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1018 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNestedConnections_ReturnsExecutableAction] + name: Resolve_WithNestedConnections_ReturnsExecutableAction + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNestedConnections_ReturnsExecutableAction + resultStatus: 1 + duration: 0.0017683 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1014 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1015 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNoActions_ReturnsEmptyList] + name: Resolve_WithNoActions_ReturnsEmptyList + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNoActions_ReturnsEmptyList + resultStatus: 1 + duration: 0.0002959 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1014 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1016 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithOneExecutableConnection_ReturnsAction] + name: Resolve_WithOneExecutableConnection_ReturnsAction + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithOneExecutableConnection_ReturnsAction + resultStatus: 1 + duration: 0.0007576 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1014 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1067 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithOneExecutableConnection_ReturnsGoal] + name: Resolve_WithOneExecutableConnection_ReturnsGoal + fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithOneExecutableConnection_ReturnsGoal + resultStatus: 1 + duration: 0.0007097 messages: output: stacktrace: @@ -2955,31 +4079,37 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1014 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_SetsAction] - name: SetAction_SetsAction - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_SetsAction + parentId: 1064 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] + - id: 1093 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ManualControllerTests][suite] + name: ManualControllerTests + fullName: CrashKonijn.Goap.UnitTests.ManualControllerTests resultStatus: 1 - duration: 0.0048143 + duration: 0.0733203 messages: - output: + output: 'Internal: JobTempAlloc has allocations that are more than the maximum + lifespan of 4 frames old - this is not allowed and likely a leak + + To + Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. + This will output the callstacks of the leaked allocations. + +' stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1018 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_SetsDataTarget] - name: SetAction_SetsDataTarget - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_SetsDataTarget + isSuite: 1 + categories: [] + parentId: 1140 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1094 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ManualControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ManualControllerTests.OnAgentResolve_CallsRunAndComplete] + name: OnAgentResolve_CallsRunAndComplete + fullName: CrashKonijn.Goap.UnitTests.ManualControllerTests.OnAgentResolve_CallsRunAndComplete resultStatus: 1 - duration: 0.0011992 + duration: 0.0468795 messages: output: stacktrace: @@ -2989,31 +4119,30 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1017 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresData] - name: SetAction_StoresData - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresData + parentId: 1093 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ManualControllerTests][suite] + - id: 1095 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + name: MultiSensorBaseTests + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests resultStatus: 1 - duration: 0.0005818 + duration: 0.1289861 messages: output: stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1020 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresPath] - name: SetAction_StoresPath - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetAction_StoresPath + isSuite: 1 + categories: [] + parentId: 1140 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1097 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/MultiSensorBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.AddLocalAndGlobalTargetSensor_AddsSensorsCorrectly] + name: AddLocalAndGlobalTargetSensor_AddsSensorsCorrectly + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.AddLocalAndGlobalTargetSensor_AddsSensorsCorrectly resultStatus: 1 - duration: 0.0029705 + duration: 0.0367292 messages: output: stacktrace: @@ -3023,14 +4152,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1011 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_CallsGoalStartEvent] - name: SetGoal_CallsGoalStartEvent - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_CallsGoalStartEvent + parentId: 1095 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + - id: 1096 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/MultiSensorBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.AddLocalAndGlobalWorldSensor_AddsSensorsCorrectly] + name: AddLocalAndGlobalWorldSensor_AddsSensorsCorrectly + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.AddLocalAndGlobalWorldSensor_AddsSensorsCorrectly resultStatus: 1 - duration: 0.0043976 + duration: 0.001449 messages: output: stacktrace: @@ -3040,14 +4169,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1012 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionFalse_DoesntCallEnd] - name: SetGoal_EndActionFalse_DoesntCallEnd - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionFalse_DoesntCallEnd + parentId: 1095 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + - id: 1099 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/MultiSensorBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.GetSensors_ReturnsCorrectSensorNames] + name: GetSensors_ReturnsCorrectSensorNames + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.GetSensors_ReturnsCorrectSensorNames resultStatus: 1 - duration: 0.0006383 + duration: 0.0011421 messages: output: stacktrace: @@ -3057,14 +4186,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1013 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionTrue_DoesCallEnd] - name: SetGoal_EndActionTrue_DoesCallEnd - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EndActionTrue_DoesCallEnd + parentId: 1095 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + - id: 1101 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/MultiSensorBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.Sense_AddsGlobalDataCorrectly] + name: Sense_AddsGlobalDataCorrectly + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.Sense_AddsGlobalDataCorrectly resultStatus: 1 - duration: 0.0006017 + duration: 0.0343496 messages: output: stacktrace: @@ -3074,14 +4203,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1010 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EnqueuesAgent] - name: SetGoal_EnqueuesAgent - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_EnqueuesAgent + parentId: 1095 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + - id: 1100 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/MultiSensorBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.Sense_AddsLocalDataCorrectly] + name: Sense_AddsLocalDataCorrectly + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.Sense_AddsLocalDataCorrectly resultStatus: 1 - duration: 0.000493 + duration: 0.0255467 messages: output: stacktrace: @@ -3091,14 +4220,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1009 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/AgentBehaviourTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_SetsGoal] - name: SetGoal_SetsGoal - fullName: CrashKonijn.Goap.UnitTests.AgentBehaviourTests.SetGoal_SetsGoal + parentId: 1095 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + - id: 1098 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/MultiSensorBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.Sense_CallsLocalAndGlobalSensors] + name: Sense_CallsLocalAndGlobalSensors + fullName: CrashKonijn.Goap.UnitTests.MultiSensorBaseTests.Sense_CallsLocalAndGlobalSensors resultStatus: 1 - duration: 0.0033422 + duration: 0.0157508 messages: output: stacktrace: @@ -3108,14 +4237,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1001 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.AgentBehaviourTests][suite] - - id: 1016 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] - name: ClassResolverTests - fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests + parentId: 1095 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.MultiSensorBaseTests][suite] + - id: 1102 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests][suite] + name: ProactiveControllerTests + fullName: CrashKonijn.Goap.UnitTests.ProactiveControllerTests resultStatus: 1 - duration: 0.0365529 + duration: 0.0274269 messages: output: stacktrace: @@ -3124,14 +4253,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1021 + parentId: 1140 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] - - id: 1017 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ClassResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsGoal] - name: Load_LoadsGoal - fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsGoal + - id: 1106 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ProactiveControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnLateUpdate_CompleteCalledOnAgentTypeRunners] + name: OnLateUpdate_CompleteCalledOnAgentTypeRunners + fullName: CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnLateUpdate_CompleteCalledOnAgentTypeRunners resultStatus: 1 - duration: 0.0146989 + duration: 0.0033003 messages: output: stacktrace: @@ -3141,14 +4270,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] - - id: 1018 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ClassResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsTargetSensorConfig] - name: Load_LoadsTargetSensorConfig - fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsTargetSensorConfig + parentId: 1102 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests][suite] + - id: 1103 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ProactiveControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnUpdate_ResolveActionCalledWhenResolveTimeExpired] + name: OnUpdate_ResolveActionCalledWhenResolveTimeExpired + fullName: CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnUpdate_ResolveActionCalledWhenResolveTimeExpired resultStatus: 1 - duration: 0.0031192 + duration: 0.0081464 messages: output: stacktrace: @@ -3158,14 +4287,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] - - id: 1019 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ClassResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsWorldSensorConfig] - name: Load_LoadsWorldSensorConfig - fullName: CrashKonijn.Goap.UnitTests.ClassResolverTests.Load_LoadsWorldSensorConfig + parentId: 1102 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests][suite] + - id: 1104 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ProactiveControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnUpdate_ResolveActionNotCalledWhenResolveTimeNotExpired] + name: OnUpdate_ResolveActionNotCalledWhenResolveTimeNotExpired + fullName: CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnUpdate_ResolveActionNotCalledWhenResolveTimeNotExpired resultStatus: 1 - duration: 0.0030469 + duration: 0.0023712 messages: output: stacktrace: @@ -3175,14 +4304,31 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1016 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ClassResolverTests][suite] - - id: 1005 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] - name: ConditionObserverTests - fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests + parentId: 1102 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests][suite] + - id: 1105 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ProactiveControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnUpdate_RunCalledOnAgentTypeRunners] + name: OnUpdate_RunCalledOnAgentTypeRunners + fullName: CrashKonijn.Goap.UnitTests.ProactiveControllerTests.OnUpdate_RunCalledOnAgentTypeRunners resultStatus: 1 - duration: 0.0189395 + duration: 0.0015897 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 0 + categories: + - Uncategorized + parentId: 1102 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ProactiveControllerTests][suite] + - id: 1107 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ReactiveControllerTests][suite] + name: ReactiveControllerTests + fullName: CrashKonijn.Goap.UnitTests.ReactiveControllerTests + resultStatus: 1 + duration: 0.0162652 messages: output: stacktrace: @@ -3191,14 +4337,14 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1027 + parentId: 1140 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] - - id: 1009 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsNotPresent] - name: IsMet_Negative_IsNotPresent - fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsNotPresent + - id: 1109 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ReactiveControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ReactiveControllerTests.OnLateUpdate_CompleteCalledOnAgentTypeRunners] + name: OnLateUpdate_CompleteCalledOnAgentTypeRunners + fullName: CrashKonijn.Goap.UnitTests.ReactiveControllerTests.OnLateUpdate_CompleteCalledOnAgentTypeRunners resultStatus: 1 - duration: 0.0068562 + duration: 0.0022865 messages: output: stacktrace: @@ -3208,14 +4354,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1005 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] - - id: 1008 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsPresent] - name: IsMet_Negative_IsPresent - fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Negative_IsPresent + parentId: 1107 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ReactiveControllerTests][suite] + - id: 1108 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ReactiveControllerTests/[UnitTests][CrashKonijn.Goap.UnitTests.ReactiveControllerTests.OnUpdate_RunCalledOnAgentTypeRunners] + name: OnUpdate_RunCalledOnAgentTypeRunners + fullName: CrashKonijn.Goap.UnitTests.ReactiveControllerTests.OnUpdate_RunCalledOnAgentTypeRunners resultStatus: 1 - duration: 0.0011009 + duration: 0.0019882 messages: output: stacktrace: @@ -3225,31 +4371,30 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1005 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] - - id: 1007 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsNotPresent] - name: IsMet_Positive_IsNotPresent - fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsNotPresent + parentId: 1107 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ReactiveControllerTests][suite] + - id: 1024 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + name: SensorRunnerTests + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests resultStatus: 1 - duration: 0.000197 + duration: 0.0338173 messages: output: stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1005 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] - - id: 1006 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/ConditionObserverTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsPresent] - name: IsMet_Positive_IsPresent - fullName: CrashKonijn.Goap.UnitTests.ConditionObserverTests.IsMet_Positive_IsPresent + isSuite: 1 + categories: [] + parentId: 1029 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1111 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_GlobalSensor_CallsSense] + name: SenseGlobal_GlobalSensor_CallsSense + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_GlobalSensor_CallsSense resultStatus: 1 - duration: 0.0003376 + duration: 0.0070664 messages: output: stacktrace: @@ -3259,30 +4404,31 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1005 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.ConditionObserverTests][suite] - - id: 1036 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests][suite] - name: GoapSetJobRunnerTests - fullName: CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1112 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_LocalSensor_DoesntCallsSense] + name: SenseGlobal_LocalSensor_DoesntCallsSense + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_LocalSensor_DoesntCallsSense resultStatus: 1 - duration: 0.12178 + duration: 0.0030763 messages: output: stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: - isSuite: 1 - categories: [] - parentId: 1062 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] - - id: 1040 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GoapSetJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_AgentHasCurrentGoalAndAction_DoesNotRun] - name: Run_AgentHasCurrentGoalAndAction_DoesNotRun - fullName: CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_AgentHasCurrentGoalAndAction_DoesNotRun + isSuite: 0 + categories: + - Uncategorized + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1113 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_MultiSensor_CallsSense] + name: SenseGlobal_MultiSensor_CallsSense + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_MultiSensor_CallsSense resultStatus: 1 - duration: 0.0450766 + duration: 0.0042127 messages: output: stacktrace: @@ -3292,14 +4438,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1036 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests][suite] - - id: 1039 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GoapSetJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_AgentHasCurrentGoalAndNoAction_Runs] - name: Run_AgentHasCurrentGoalAndNoAction_Runs - fullName: CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_AgentHasCurrentGoalAndNoAction_Runs + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1114 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_GlobalSensor_DoesntCallsSense] + name: SenseLocal_GlobalSensor_DoesntCallsSense + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_GlobalSensor_DoesntCallsSense resultStatus: 1 - duration: 0.0665784 + duration: 0.001154 messages: output: stacktrace: @@ -3309,14 +4455,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1036 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests][suite] - - id: 1038 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GoapSetJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_AgentHasNoCurrentGoal_DoesNotRun] - name: Run_AgentHasNoCurrentGoal_DoesNotRun - fullName: CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_AgentHasNoCurrentGoal_DoesNotRun + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1115 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_LocalSensor_CallsSense] + name: SenseLocal_LocalSensor_CallsSense + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_LocalSensor_CallsSense resultStatus: 1 - duration: 0.0011965 + duration: 0.0034145 messages: output: stacktrace: @@ -3326,14 +4472,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1036 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests][suite] - - id: 1038 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GoapSetJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_SensesGlobalSensors] - name: Run_SensesGlobalSensors - fullName: CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_SensesGlobalSensors + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1116 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_MultiSensor_CallsSense] + name: SenseLocal_MultiSensor_CallsSense + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_MultiSensor_CallsSense resultStatus: 1 - duration: 0.0006567 + duration: 0.0011102 messages: output: stacktrace: @@ -3343,14 +4489,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1036 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests][suite] - - id: 1037 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GoapSetJobRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_UpdatesSensorRunner] - name: Run_UpdatesSensorRunner - fullName: CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests.Run_UpdatesSensorRunner + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1117 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithAgent_OnlyRunsMatchingKey] + name: SenseLocal_WithAgent_OnlyRunsMatchingKey + fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithAgent_OnlyRunsMatchingKey resultStatus: 1 - duration: 0.0006459 + duration: 0.0035265 messages: output: stacktrace: @@ -3360,14 +4506,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1036 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GoapSetJobRunnerTests][suite] - - id: 1014 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - name: GraphResolverTests - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests + parentId: 1110 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] + - id: 1141 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators][suite] + name: Validators + fullName: CrashKonijn.Goap.UnitTests.Validators resultStatus: 1 - duration: 0.0536453 + duration: 0.0715289 messages: output: stacktrace: @@ -3376,31 +4522,30 @@ MonoBehaviour: description: isSuite: 1 categories: [] - parentId: 1038 + parentId: 1140 parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] - - id: 1042 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeCostHeuristics] - name: Resolve_ShouldIncludeCostHeuristics - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeCostHeuristics + - id: 1127 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests][suite] + name: TargetKeySensorsValidatorTests + fullName: CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests resultStatus: 1 - duration: 0.0367554 + duration: 0.0337241 messages: output: stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: - isSuite: 0 - categories: - - Uncategorized - parentId: 1036 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - - id: 1019 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeLocationHeuristics] - name: Resolve_ShouldIncludeLocationHeuristics - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_ShouldIncludeLocationHeuristics + isSuite: 1 + categories: [] + parentId: 1141 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators][suite] + - id: 1128 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/TargetKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_MissingSensor_ShouldReturnWarning] + name: Validate_MissingSensor_ShouldReturnWarning + fullName: CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_MissingSensor_ShouldReturnWarning resultStatus: 1 - duration: 0.001475 + duration: 0.0260875 messages: output: stacktrace: @@ -3410,14 +4555,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1014 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - - id: 1017 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithMultipleConnections_ReturnsExecutableAction] - name: Resolve_WithMultipleConnections_ReturnsExecutableAction - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithMultipleConnections_ReturnsExecutableAction + parentId: 1127 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests][suite] + - id: 1129 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/TargetKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_NoMissingSensor_ShouldReturnNoWarning] + name: Validate_NoMissingSensor_ShouldReturnNoWarning + fullName: CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_NoMissingSensor_ShouldReturnNoWarning resultStatus: 1 - duration: 0.000685 + duration: 0.0033938 messages: output: stacktrace: @@ -3427,14 +4572,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1014 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - - id: 1018 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNestedConnections_ReturnsExecutableAction] - name: Resolve_WithNestedConnections_ReturnsExecutableAction - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNestedConnections_ReturnsExecutableAction + parentId: 1127 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests][suite] + - id: 1131 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/TargetKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_WithNullSensorWorldKey_ShouldReturnNoWarnings] + name: Validate_WithNullSensorWorldKey_ShouldReturnNoWarnings + fullName: CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_WithNullSensorWorldKey_ShouldReturnNoWarnings resultStatus: 1 - duration: 0.0007092 + duration: 0.0008968 messages: output: stacktrace: @@ -3444,14 +4589,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1014 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - - id: 1015 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNoActions_ReturnsEmptyList] - name: Resolve_WithNoActions_ReturnsEmptyList - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithNoActions_ReturnsEmptyList + parentId: 1127 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests][suite] + - id: 1130 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/TargetKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_WithNullWorldKey_ShouldReturnNoWarnings] + name: Validate_WithNullWorldKey_ShouldReturnNoWarnings + fullName: CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests.Validate_WithNullWorldKey_ShouldReturnNoWarnings resultStatus: 1 - duration: 0.0034459 + duration: 0.0011113 messages: output: stacktrace: @@ -3461,14 +4606,30 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1014 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - - id: 1016 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/GraphResolverTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithOneExecutableConnection_ReturnsAction] - name: Resolve_WithOneExecutableConnection_ReturnsAction - fullName: CrashKonijn.Goap.UnitTests.GraphResolverTests.Resolve_WithOneExecutableConnection_ReturnsAction + parentId: 1127 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.TargetKeySensorsValidatorTests][suite] + - id: 1132 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests][suite] + name: WorldKeySensorsValidatorTests + fullName: CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests resultStatus: 1 - duration: 0.0004723 + duration: 0.028253 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1141 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators][suite] + - id: 1133 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/WorldKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_MissingSensor_ShouldReturnWarning] + name: Validate_MissingSensor_ShouldReturnWarning + fullName: CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_MissingSensor_ShouldReturnWarning + resultStatus: 1 + duration: 0.0050408 messages: output: stacktrace: @@ -3478,30 +4639,31 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1014 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.GraphResolverTests][suite] - - id: 1024 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - name: SensorRunnerTests - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests + parentId: 1132 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests][suite] + - id: 1134 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/WorldKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_NoMissingSensor_ShouldReturnNoWarning] + name: Validate_NoMissingSensor_ShouldReturnNoWarning + fullName: CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_NoMissingSensor_ShouldReturnNoWarning resultStatus: 1 - duration: 0.0446801 + duration: 0.0116111 messages: output: stacktrace: notRunnable: 0 ignoredOrSkipped: 0 description: - isSuite: 1 - categories: [] - parentId: 1029 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] - - id: 1028 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithNegativeTargetSense_IsPresentInTargets] - name: SenseGlobal_WithNegativeTargetSense_IsPresentInTargets - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithNegativeTargetSense_IsPresentInTargets + isSuite: 0 + categories: + - Uncategorized + parentId: 1132 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests][suite] + - id: 1136 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/WorldKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_WithNullSensorWorldKey_ShouldReturnNoWarnings] + name: Validate_WithNullSensorWorldKey_ShouldReturnNoWarnings + fullName: CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_WithNullSensorWorldKey_ShouldReturnNoWarnings resultStatus: 1 - duration: 0.0116679 + duration: 0.0011648 messages: output: stacktrace: @@ -3511,14 +4673,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1032 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithNegativeWorldSense_IsPresentInStates] - name: SenseGlobal_WithNegativeWorldSense_IsPresentInStates - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithNegativeWorldSense_IsPresentInStates + parentId: 1132 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests][suite] + - id: 1135 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/WorldKeySensorsValidatorTests/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_WithNullWorldKey_ShouldReturnNoWarnings] + name: Validate_WithNullWorldKey_ShouldReturnNoWarnings + fullName: CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests.Validate_WithNullWorldKey_ShouldReturnNoWarnings resultStatus: 1 - duration: 0.0067515 + duration: 0.0012855 messages: output: stacktrace: @@ -3528,14 +4690,30 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1030 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1027 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithPositiveTargetSense_IsPresentInTargets] - name: SenseGlobal_WithPositiveTargetSense_IsPresentInTargets - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithPositiveTargetSense_IsPresentInTargets + parentId: 1132 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/Validators/[UnitTests][CrashKonijn.Goap.UnitTests.Validators.WorldKeySensorsValidatorTests][suite] + - id: 1118 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + name: WorldDataBaseTests + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests + resultStatus: 1 + duration: 0.0292133 + messages: + output: + stacktrace: + notRunnable: 0 + ignoredOrSkipped: 0 + description: + isSuite: 1 + categories: [] + parentId: 1140 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/[UnitTests][suite] + - id: 1119 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.GetTarget_ReturnsCorrectTarget] + name: GetTarget_ReturnsCorrectTarget + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.GetTarget_ReturnsCorrectTarget resultStatus: 1 - duration: 0.002971 + duration: 0.0112463 messages: output: stacktrace: @@ -3545,14 +4723,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1025 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithPositiveWorldSense_IsPresentInStates] - name: SenseGlobal_WithPositiveWorldSense_IsPresentInStates - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseGlobal_WithPositiveWorldSense_IsPresentInStates + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1120 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.IsTrue_Generic_ReturnsCorrectResult] + name: IsTrue_Generic_ReturnsCorrectResult + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.IsTrue_Generic_ReturnsCorrectResult resultStatus: 1 - duration: 0.0005061 + duration: 0.0008102 messages: output: stacktrace: @@ -3562,14 +4740,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1040 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_ContainsGlobalState] - name: SenseLocal_ContainsGlobalState - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_ContainsGlobalState + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1121 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.IsTrue_Instance_ReturnsCorrectResult] + name: IsTrue_Instance_ReturnsCorrectResult + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.IsTrue_Instance_ReturnsCorrectResult resultStatus: 1 - duration: 0.0055158 + duration: 0.0002491 messages: output: stacktrace: @@ -3579,14 +4757,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1030 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1039 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_ContainsGlobalTarget] - name: SenseLocal_ContainsGlobalTarget - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_ContainsGlobalTarget + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1126 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetParent_UpdatesStatesAndTargetsCorrectly] + name: SetParent_UpdatesStatesAndTargetsCorrectly + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetParent_UpdatesStatesAndTargetsCorrectly resultStatus: 1 - duration: 0.0008623 + duration: 0.0035834 messages: output: stacktrace: @@ -3596,14 +4774,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1030 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1032 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithNegativeTargetSense_IsPresentInTargets] - name: SenseLocal_WithNegativeTargetSense_IsPresentInTargets - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithNegativeTargetSense_IsPresentInTargets + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1122 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetState_Generic_AddsStateCorrectly] + name: SetState_Generic_AddsStateCorrectly + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetState_Generic_AddsStateCorrectly resultStatus: 1 - duration: 0.0050006 + duration: 0.0003038 messages: output: stacktrace: @@ -3613,14 +4791,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1030 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithNegativeWorldSense_IsNotPresentInStates] - name: SenseLocal_WithNegativeWorldSense_IsNotPresentInStates - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithNegativeWorldSense_IsNotPresentInStates + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1123 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetState_Instance_AddsStateCorrectly] + name: SetState_Instance_AddsStateCorrectly + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetState_Instance_AddsStateCorrectly resultStatus: 1 - duration: 0.000876 + duration: 0.0003299 messages: output: stacktrace: @@ -3630,14 +4808,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1031 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithPositiveTargetSense_IsPresentInTargets] - name: SenseLocal_WithPositiveTargetSense_IsPresentInTargets - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithPositiveTargetSense_IsPresentInTargets + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1124 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetTarget_Generic_AddsTargetCorrectly] + name: SetTarget_Generic_AddsTargetCorrectly + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetTarget_Generic_AddsTargetCorrectly resultStatus: 1 - duration: 0.0008241 + duration: 0.0003621 messages: output: stacktrace: @@ -3647,14 +4825,14 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - - id: 1029 - uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/SensorRunnerTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithPositiveWorldSense_IsPresentInStates] - name: SenseLocal_WithPositiveWorldSense_IsPresentInStates - fullName: CrashKonijn.Goap.UnitTests.SensorRunnerTests.SenseLocal_WithPositiveWorldSense_IsPresentInStates + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + - id: 1125 + uniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/WorldDataBaseTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetTarget_Instance_AddsTargetCorrectly] + name: SetTarget_Instance_AddsTargetCorrectly + fullName: CrashKonijn.Goap.UnitTests.WorldDataBaseTests.SetTarget_Instance_AddsTargetCorrectly resultStatus: 1 - duration: 0.000714 + duration: 0.0004587 messages: output: stacktrace: @@ -3664,15 +4842,15 @@ MonoBehaviour: isSuite: 0 categories: - Uncategorized - parentId: 1024 - parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.SensorRunnerTests][suite] - m_ResultText: UnityGoap (0.547s) + parentId: 1118 + parentUniqueId: UnitTests.dll/CrashKonijn/Goap/UnitTests/[UnitTests][CrashKonijn.Goap.UnitTests.WorldDataBaseTests][suite] + m_ResultText: UnityGoap (1.314s) m_ResultStacktrace: m_TestListState: scrollPos: {x: 0, y: 0} m_SelectedIDs: f887fc56 m_LastClickedID: 1459390456 - m_ExpandedIDs: 4fed6d8c15567b9961a474a52b132daad8fe75b6ddcc12bb3e889fcae7e66fcdb8db52d43e20cce253d1dcec12104beed63c3df801dd1d0085e9450bcc9e32109561f618b3f8a51c4e720d1ed03d582fe3a8223c0bb0ea3c50f8ee46a35cd151c2b227521a516b56f887fc5610cb8d5b02b060631f4b66649b83b6668cc8747a9c98587b2d8f377dffffff7f + m_ExpandedIDs: 4fed6d8c15567b992b132daaddcc12bb3e889fcae7e66fcdb8db52d43e20cce253d1dcec12104beed63c3df801dd1d0085e9450bcc9e32109561f618b3f8a51c4e720d1ed03d582f0bb0ea3c50f8ee46a35cd151c2b227521a516b56f887fc5610cb8d5b02b060631f4b66649b83b6668cc8747a9c98587b2d8f377dffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: diff --git a/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs b/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs index affc6343..fc7cd82b 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/Extensions.cs @@ -24,6 +24,11 @@ public static float GetCost(this INode node, IActionReceiver agent) return action.GetCost(agent, agent.Injector); } + if (node.Action is IGoal goal) + { + return goal.GetCost(agent, agent.Injector); + } + return 0; } } diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs index e352b293..71bd0d51 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/ConnectionElement.cs @@ -77,7 +77,7 @@ private Color GetColor() if (this.values.SelectedObject is not IMonoGoapActionProvider agent) return Color.black; - var actions = agent.CurrentPlan; + var actions = agent.CurrentPlan.Plan; if (actions.Contains(this.toNode.GraphNode.Action)) return new Color(0, 157, 100); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs index 299c9ecc..9e1c4596 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/GraphViewerEditorWindow.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Goap.Core; +using System; +using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Resolver; using CrashKonijn.Goap.Runtime; using UnityEditor; @@ -19,8 +20,16 @@ private static void ShowWindow() var window = GetWindow(); window.titleContent = new GUIContent("Graph Viewer (GOAP)"); window.Show(); + + EditorApplication.playModeStateChanged -= window.OnPlayModeChange; + EditorApplication.playModeStateChanged += window.OnPlayModeChange; } - + + private void OnPlayModeChange(PlayModeStateChange obj) + { + this.OnSelectionChange(); + } + private void OnFocus() { this.OnSelectionChange(); @@ -35,57 +44,55 @@ private void OnSelectionChange() if (this.values.SelectedObject == selectedObject) return; + + var (agentType, obj) = this.GetAgentType(selectedObject); + if (agentType == null) + return; + + var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); + this.RenderGraph(graph, obj); + } + private (IAgentType agentType, Object obj) GetAgentType(Object selectedObject) + { if (selectedObject is AgentTypeScriptable agentTypeScriptable) { - var agentType = new AgentTypeFactory(GoapConfig.Default).Create(agentTypeScriptable.Create(), false); - var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); - - this.RenderGraph(graph, selectedObject); - return; + return (new AgentTypeFactory(GoapConfig.Default).Create(agentTypeScriptable.Create(), false), selectedObject); } if (selectedObject is CapabilityConfigScriptable capabilityConfigScriptable) { - var agentType = new AgentTypeFactory(GoapConfig.Default).Create(capabilityConfigScriptable.Create(), false); - var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); - - this.RenderGraph(graph, selectedObject); - return; + return (new AgentTypeFactory(GoapConfig.Default).Create(capabilityConfigScriptable.Create(), false), selectedObject); } if (selectedObject is ScriptableCapabilityFactoryBase capabilityFactoryScriptable) { - var agentType = - new AgentTypeFactory(GoapConfig.Default).Create(capabilityFactoryScriptable.Create(), false); - var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); - - this.RenderGraph(graph, selectedObject); - return; + return (new AgentTypeFactory(GoapConfig.Default).Create(capabilityFactoryScriptable.Create(), false), selectedObject); } if (selectedObject is not GameObject gameObject) - return; + return default; var typeFactory = gameObject.GetComponent(); if (typeFactory != null) { - var agentType = new AgentTypeFactory(GoapConfig.Default).Create(typeFactory.Create(), false); - var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); - - this.RenderGraph(graph, selectedObject); - return; + return (new AgentTypeFactory(GoapConfig.Default).Create(typeFactory.Create(), false), selectedObject); } - var agent = gameObject.GetComponent(); - if (agent != null) - { - var agentType = agent.AgentType ?? new AgentTypeFactory(GoapConfig.Default).Create(agent.AgentTypeBehaviour.Config.Create(), false); - var graph = new GraphBuilder(GoapConfig.Default.KeyResolver).Build(agentType.GetAllNodes().ToArray()); + var provider = gameObject.GetComponent(); + if (provider == null) + return default; - this.RenderGraph(graph, agent); - return; + if (provider.AgentType != null) + return (provider.AgentType, provider); + + if (provider.AgentTypeBehaviour == null) + { + Debug.Log("Unable to render graph; No AgentType or AgentTypeBehaviour found on the agent! Please assign one in the inspector or through code in the Awake method."); + return default; } + + return (new AgentTypeFactory(GoapConfig.Default).Create(provider.AgentTypeBehaviour.Config.Create(), false), provider); } private void RenderGraph(IGraph graph, Object selectedObject) diff --git a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs index cb50fcdd..83e6b97a 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/GraphViewer/NodeElement.cs @@ -27,7 +27,16 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues this.Title = new Label($"{graphNode.Action.GetType().GetGenericTypeName()}"); this.Cost = new Label(); - this.Content.Add(new HorizontalSplitView(this.Title, this.Cost, 80)); + var costWrapper = new VisualElement + { + style = + { + alignItems = Align.FlexEnd, + } + }; + costWrapper.Add(this.Cost); + + this.Content.Add(new HorizontalSplitView(this.Title, costWrapper, 60)); this.Target = new Label(); this.Content.Add(this.Target); @@ -70,12 +79,10 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues if (!Application.isPlaying) { - var config = (graphNode.Action as IGoapAction)?.Config; - - if (config != null) + if (graphNode.Action is IGoapAction goapAction) { - this.Target.text = $"Target: {config.Target.GetType().GetGenericTypeName()}"; - this.Cost.text = $"Cost: {config.BaseCost}"; + this.Target.text = $"Target: {goapAction.Config.Target.GetType().GetGenericTypeName()}"; + this.Cost.text = $"Cost: {goapAction.Config.BaseCost}"; } this.Effects = new VisualElement(); @@ -92,49 +99,60 @@ public NodeElement(INode graphNode, VisualElement bezierRoot, EditorWindowValues this.schedule.Execute(() => { - this.Node.RemoveFromClassList("active"); - this.Node.RemoveFromClassList("disabled"); - this.Node.RemoveFromClassList("path"); - if (!Application.isPlaying) return; - if (values.SelectedObject is not IMonoGoapActionProvider agent) + if (values.SelectedObject is not IMonoGoapActionProvider provider) return; - if (agent.CurrentGoal == this.GraphNode.Action) - { - this.Node.AddToClassList("path"); - return; - } + this.UpdateClasses(graphNode, provider); - if (agent.Agent.ActionState.Action == this.GraphNode.Action) + this.Cost.text = $"Cost: {graphNode.GetCost(provider.Receiver):0.00}"; + + if (graphNode.Action is IGoapAction action) { - this.Node.AddToClassList("active"); - return; - } + var target = provider.WorldData.GetTarget(action); + var targetText = target != null ? target.Position.ToString() : "null"; - if (agent.CurrentPlan.Contains(this.GraphNode.Action)) - { - this.Node.AddToClassList("path"); - return; + this.Target.text = $"Target: {targetText}"; } + + }).Every(33); + } - if (graphNode.Action is not IAction action) - return; + private void UpdateClasses(INode graphNode, IMonoGoapActionProvider provider) + { + this.Node.RemoveFromClassList("active"); + this.Node.RemoveFromClassList("disabled"); + this.Node.RemoveFromClassList("path"); + - if (!action.IsEnabled(agent.Agent)) - { - this.Node.AddToClassList("disabled"); - return; - } + if (provider.CurrentPlan.Goal == this.GraphNode.Action) + { + this.Node.AddToClassList("path"); + return; + } + + if (provider.Receiver.ActionState.Action == this.GraphNode.Action) + { + this.Node.AddToClassList("active"); + return; + } + + if (provider.CurrentPlan.Plan.Contains(this.GraphNode.Action)) + { + this.Node.AddToClassList("path"); + return; + } - this.Cost.text = $"Cost: {graphNode.GetCost(agent.Agent)}"; - var target = agent.WorldData.GetTarget(graphNode.Action as IGoapAction); - var targetText = target != null ? target.Position.ToString() : "null"; + if (graphNode.Action is not IAction action) + return; - this.Target.text = $"Target: {targetText}"; - }).Every(33); + if (!action.IsEnabled(provider.Receiver)) + { + this.Node.AddToClassList("disabled"); + return; + } } public Label Target { get; set; } diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs index c24e4620..647c7a90 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/AgentEditor.cs @@ -16,7 +16,7 @@ public override VisualElement CreateInspectorGUI() root.styleSheets.Add(AssetDatabase.LoadAssetAtPath($"{GoapEditorSettings.BasePath}/Styles/Generic.uss")); // root.Add(new PropertyField(this.serializedObject.FindProperty("agentTypeBehaviour"))); - root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); + root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); root.Add(new PropertyField(this.serializedObject.FindProperty("k__BackingField"))); diff --git a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs index 7568e474..03a78e45 100644 --- a/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs +++ b/Package/Editor/CrashKonijn.Goap.Editor/TypeDrawers/GoapActionProviderEditor.cs @@ -1,4 +1,6 @@ -using CrashKonijn.Agent.Runtime; +using System; +using System.Linq; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Runtime; using UnityEditor; using UnityEditor.UIElements; @@ -24,7 +26,7 @@ public override VisualElement CreateInspectorGUI() var agent = (GoapActionProvider) this.target; - var currentGoal = agent.CurrentGoal; + var currentGoal = agent.CurrentPlan; root.Add(new Card((card) => { @@ -34,10 +36,10 @@ public override VisualElement CreateInspectorGUI() label.schedule.Execute(() => { - if (currentGoal == agent.CurrentGoal) + if (currentGoal == agent.CurrentPlan) return; - currentGoal = agent.CurrentGoal; + currentGoal = agent.CurrentPlan; label.text = this.GetText(agent); }).Every(33); }); @@ -52,9 +54,12 @@ public override VisualElement CreateInspectorGUI() private string GetText(GoapActionProvider provider) { - return $@"Goal: {provider.CurrentGoal?.GetType().GetGenericTypeName()} + var requestGoals = provider.GoalRequest?.Goals?.Select(x => x.GetType().GetGenericTypeName()); + + return $@"Goal: {provider.CurrentPlan?.Goal?.GetType().GetGenericTypeName()} +Request: {string.Join(", ", requestGoals ?? Array.Empty())} AgentType: {provider.AgentType?.Id} -Receiver: {provider.Agent?.GetType().GetGenericTypeName()}"; +Receiver: {provider.Receiver?.GetType().GetGenericTypeName()}"; } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs index 7d0faf3e..30f097eb 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionProvider.cs @@ -2,6 +2,7 @@ { public interface IActionProvider { + IActionReceiver Receiver { get; set; } void ResolveAction(); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs index 36c0e5af..f7a9602c 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionReceiver.cs @@ -10,7 +10,7 @@ public interface IActionReceiver ILogger Logger { get; } IAgentEvents Events { get; } Transform Transform { get; } - void SetAction(IActionResolver actionResolver, IAction action, ITarget target); + void SetAction(IActionProvider actionProvider, IAction action, ITarget target); void StopAction(bool resolveAction = true); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs deleted file mode 100644 index 40751148..00000000 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace CrashKonijn.Agent.Core -{ - public interface IActionRequest - { - - } -} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta deleted file mode 100644 index 8a2a6680..00000000 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionRequest.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 217e921da6d14eab981e1c9714cf2703 -timeCreated: 1719576019 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs deleted file mode 100644 index e2d1930b..00000000 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace CrashKonijn.Agent.Core -{ - public interface IActionResolver - { - void ResolveAction(); - } -} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta deleted file mode 100644 index 21059d09..00000000 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IActionResolver.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 17f39b5ccf9f4958b1b89617a7f286bb -timeCreated: 1719394095 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs index 8b213c30..3bd2f70a 100644 --- a/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs +++ b/Package/Runtime/CrashKonijn.Agent.Core/Interfaces/IAgent.cs @@ -17,7 +17,6 @@ public interface IAgent : IActionReceiver IAgentDistanceObserver DistanceObserver { get; } ITarget CurrentTarget { get; } - IActionResolver ActionResolver { get; set; } void Initialize(); void Run(); diff --git a/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs index f3dddac9..2225acc3 100644 --- a/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionProviderBase.cs @@ -5,6 +5,7 @@ namespace CrashKonijn.Agent.Runtime { public abstract class ActionProviderBase : MonoBehaviour, IActionProvider { + public abstract IActionReceiver Receiver { get; set; } public abstract void ResolveAction(); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs index 190f07e9..b0bec562 100644 --- a/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/ActionRunner.cs @@ -38,6 +38,7 @@ private bool RunIsValid() if (!isValid) { + this.agent.Logger.Warning($"Action {this.agent.ActionState.Action.GetType().GetGenericTypeName()} is not valid!"); this.agent.StopAction(); return false; } diff --git a/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs index f5ffdb9e..32ded224 100644 --- a/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs +++ b/Package/Runtime/CrashKonijn.Agent.Runtime/AgentBehaviour.cs @@ -8,8 +8,19 @@ namespace CrashKonijn.Agent.Runtime public class AgentBehaviour : MonoBehaviour, IMonoAgent { [field: SerializeField] - public ActionProviderBase ActionProvider { get; set; } - + public ActionProviderBase ActionProviderBase { get; set; } + + private IActionProvider actionProvider; + public IActionProvider ActionProvider + { + get => this.actionProvider; + set + { + this.actionProvider = value; + this.actionProvider.Receiver = this; + } + } + [field: SerializeField] public LoggerConfig LoggerConfig { get; set; } = new LoggerConfig(); @@ -29,7 +40,6 @@ public class AgentBehaviour : MonoBehaviour, IMonoAgent public IDataReferenceInjector Injector { get; private set; } public IAgentDistanceObserver DistanceObserver { get; set; } = new VectorDistanceObserver(); public ILogger Logger { get; set; } = new AgentLogger(); - public IActionResolver ActionResolver { get; set; } public IAgentTimers Timers { get; } = new AgentTimers(); @@ -49,6 +59,9 @@ public void Initialize() this.Injector = new DataReferenceInjector(this); this.actionRunner = new ActionRunner(this, new AgentProxy(this.SetState, this.SetMoveState, (state) => this.ActionState.RunState = state, this.IsInRange)); this.Logger.Initialize(this.LoggerConfig, this); + + if (this.ActionProviderBase != null) + this.ActionProvider = this.ActionProviderBase; } private void Update() @@ -116,9 +129,9 @@ private bool IsInRange() return this.ActionState.Action.IsInRange(this, distance, this.ActionState.Data, this.Injector); } - public void SetAction(IActionResolver actionResolver, IAction action, ITarget target) + public void SetAction(IActionProvider actionProvider, IAction action, ITarget target) { - this.ActionResolver = actionResolver; + this.ActionProvider = actionProvider; if (this.ActionState.Action != null) { @@ -165,10 +178,10 @@ public void CompleteAction(bool resolveAction = true) public void ResolveAction() { - if (this.ActionResolver == null) - throw new AgentException("No action resolver found!"); + if (this.ActionProvider == null) + throw new AgentException("No action provider found!"); - this.ActionResolver.ResolveAction(); + this.ActionProvider.ResolveAction(); } private void ResetAction() diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs index 84ddf389..9fd9f8c6 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Delegates.cs @@ -1,7 +1,9 @@ namespace CrashKonijn.Goap.Core { + public delegate void GoalRequestDelegate(IGoalRequest goal); public delegate void GoalDelegate(IGoal goal); public delegate void AgentGoalDelegate(IMonoGoapActionProvider actionProvider, IGoal goal); + public delegate void AgentGoalRequestDelegate(IMonoGoapActionProvider actionProvider, IGoalRequest request); public delegate void AgentTypeDelegate(IAgentType agentType); public delegate void GoapAgentDelegate(IMonoGoapActionProvider actionProvider); public delegate void GoapActionDelegate(IGoapAction action); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs index 219f7e66..21d79300 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IActionConfig.cs @@ -8,6 +8,7 @@ public interface IActionConfig : IClassConfig ITargetKey Target { get; } float StoppingDistance { get; } bool RequiresTarget { get; } + bool ValidateConditions { get; } ICondition[] Conditions { get; } IEffect[] Effects { get; } public ActionMoveMode MoveMode { get; } diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs index 36f5c28f..8ac686e6 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentType.cs @@ -19,6 +19,6 @@ public interface IAgentType TGoal ResolveGoal() where TGoal : IGoal; - bool AllConditionsMet(IGoapAgent agent, IGoapAction action); + bool AllConditionsMet(IGoapActionProvider actionProvider, IGoapAction action); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs index 7cf0f5a2..3f882ea0 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IAgentTypeEvents.cs @@ -17,8 +17,8 @@ public interface IAgentTypeEvents event GoapAgentActionDelegate OnActionComplete; void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction action); - event AgentGoalDelegate OnNoActionFound; - void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal); + event AgentGoalRequestDelegate OnNoActionFound; + void NoActionFound(IMonoGoapActionProvider actionProvider, IGoalRequest request); // Goals event AgentGoalDelegate OnGoalStart; diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs index 764548ff..fd137d43 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoal.cs @@ -1,7 +1,9 @@ -namespace CrashKonijn.Goap.Core +using CrashKonijn.Agent.Core; + +namespace CrashKonijn.Goap.Core { public interface IGoal : IConnectable, IHasConfig { - public int GetCost(IWorldData data); + public float GetCost(IActionReceiver agent, IComponentReference references); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs index edf889d3..6743129f 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalConfig.cs @@ -4,7 +4,7 @@ namespace CrashKonijn.Goap.Core { public interface IGoalConfig : IClassConfig { - int BaseCost { get; set; } + float BaseCost { get; set; } List Conditions { get; } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalRequest.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalRequest.cs new file mode 100644 index 00000000..7de593bd --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalRequest.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; + +namespace CrashKonijn.Goap.Core +{ + public interface IGoalRequest + { + IGoal[] Goals { get; } + } + + public interface IGoalResult + { + IGoal Goal { get; } + IConnectable[] Plan { get; } + IGoapAction Action { get; } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalRequest.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalRequest.cs.meta new file mode 100644 index 00000000..813c9a92 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoalRequest.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ffba1c43e75347fdb41d4866266d5bdf +timeCreated: 1719595021 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProvider.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProvider.cs new file mode 100644 index 00000000..704c0810 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProvider.cs @@ -0,0 +1,55 @@ +using System; +using CrashKonijn.Agent.Core; +using UnityEngine; + +namespace CrashKonijn.Goap.Core +{ + public interface IGoapActionProvider : IActionProvider + { + float DistanceMultiplier { get; } + IAgentType AgentType { get; } + IGoalResult CurrentPlan { get; } + ILocalWorldData WorldData { get; } + IGoapAgentEvents Events { get; } + ILogger Logger { get; } + IGoalRequest GoalRequest { get; } + Vector3 Position { get; } + [Obsolete("Use RequestGoal instead.")] + void SetGoal(bool endAction) where TGoal : IGoal; + [Obsolete("Use RequestGoal instead.")] + void SetGoal(IGoal goal, bool endAction); + + void RequestGoal(bool endAction) + where TGoal : IGoal; + + void RequestGoal(bool endAction) + where TGoal1 : IGoal + where TGoal2 : IGoal; + + void RequestGoal(bool endAction) + where TGoal1 : IGoal + where TGoal2 : IGoal + where TGoal3 : IGoal; + + void RequestGoal(bool endAction) + where TGoal1 : IGoal + where TGoal2 : IGoal + where TGoal3 : IGoal + where TGoal4 : IGoal; + + public void RequestGoal(bool endAction) + where TGoal1 : IGoal + where TGoal2 : IGoal + where TGoal3 : IGoal + where TGoal4 : IGoal + where TGoal5 : IGoal; + + void RequestGoal(IGoal goal, bool endAction); + void RequestGoal(IGoalRequest request, bool endAction); + + void SetAction(IGoalResult result); + void ClearGoal(); + void StopAction(bool resolveAction = true); + void SetDistanceMultiplierSpeed(float speed); + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs.meta b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProvider.cs.meta similarity index 100% rename from Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs.meta rename to Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapActionProvider.cs.meta diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs deleted file mode 100644 index e29e9ba8..00000000 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgent.cs +++ /dev/null @@ -1,24 +0,0 @@ -using CrashKonijn.Agent.Core; -using UnityEngine; - -namespace CrashKonijn.Goap.Core -{ - public interface IGoapAgent : IActionResolver - { - float DistanceMultiplier { get; } - IActionReceiver Agent { get; } - IAgentType AgentType { get; } - IGoal CurrentGoal { get; } - ILocalWorldData WorldData { get; } - IConnectable[] CurrentPlan { get; } - IGoapAgentEvents Events { get; } - ILogger Logger { get; } - Vector3 Position { get; } - void SetGoal(bool endAction) where TGoal : IGoal; - void SetGoal(IGoal goal, bool endAction); - void SetAction(IGoapAction action, IConnectable[] path); - void ClearGoal(); - void StopAction(bool resolveAction = true); - void SetDistanceMultiplierSpeed(float speed); - } -} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs index cfcc16d0..2b7f7533 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapAgentEvents.cs @@ -5,9 +5,10 @@ namespace CrashKonijn.Goap.Core public interface IGoapAgentEvents { void Bind(IMonoGoapActionProvider actionProvider, IAgentTypeEvents events); + void Bind(IActionReceiver receiver); void Unbind(); - event GoalDelegate OnNoActionFound; - void NoActionFound(IGoal goal); + event GoalRequestDelegate OnNoActionFound; + void NoActionFound(IGoalRequest request); event GoalDelegate OnGoalStart; void GoalStart(IGoal goal); diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs index 11003e20..c7de63e4 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IGoapEvents.cs @@ -15,8 +15,8 @@ public interface IGoapEvents event GoapAgentActionDelegate OnActionComplete; void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction action); - event AgentGoalDelegate OnNoActionFound; - void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal); + event AgentGoalRequestDelegate OnNoActionFound; + void NoActionFound(IMonoGoapActionProvider actionProvider, IGoalRequest request); // Goals event AgentGoalDelegate OnGoalStart; diff --git a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs index 2cf32117..3dafc38a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs +++ b/Package/Runtime/CrashKonijn.Goap.Core/Interfaces/IMonoGoapActionProvider.cs @@ -2,7 +2,7 @@ namespace CrashKonijn.Goap.Core { - public interface IMonoGoapActionProvider : IGoapAgent, IMonoBehaviour + public interface IMonoGoapActionProvider : IGoapActionProvider, IMonoBehaviour { } diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs index f199c37c..fefc2a12 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Extensions.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using CrashKonijn.Goap.Core; @@ -31,5 +32,20 @@ private static INode ToNode(IConnectable action) }).Cast().ToList() ?? new List() }; } + + public static string GetGenericTypeName(this Type type) + { + var typeName = type.Name; + + if (type.IsGenericType) + { + var genericArguments = type.GetGenericArguments(); + var genericTypeName = typeName.Substring(0, typeName.IndexOf('`')); + var typeArgumentNames = string.Join(",", genericArguments.Select(a => a.GetGenericTypeName())); + typeName = $"{genericTypeName}<{typeArgumentNames}>"; + } + + return typeName; + } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs index 7d62f515..862ea25b 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolver.cs @@ -2,6 +2,7 @@ using System.Linq; using CrashKonijn.Goap.Core; using Unity.Collections; +using UnityEngine; namespace CrashKonijn.Goap.Resolver { @@ -122,6 +123,7 @@ public IGraph GetGraph() public int GetIndex(IConnectable action) => this.actionIndexList.IndexOf(action); public IGoapAction GetAction(int index) => this.actionIndexList[index] as IGoapAction; + public IGoal GetGoal(int index) => this.actionIndexList[index] as IGoal; public void Dispose() { diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs index 6825f135..73b16bab 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/GraphResolverJob.cs @@ -3,6 +3,7 @@ using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; +using UnityEngine; namespace CrashKonijn.Goap.Resolver { @@ -21,7 +22,7 @@ public struct NodeData public float H; public int ParentIndex; public float3 Position; - + public float F => this.G + this.H; } @@ -75,6 +76,7 @@ public struct GraphResolverJob : IJob // Results public NativeList Result; + public NativeList PickedGoal; public static readonly float3 InvalidPosition = new float3(float.MaxValue, float.MaxValue, float.MaxValue); @@ -93,8 +95,8 @@ public void Execute() var nodeData = new NodeData { Index = i, - G = 0, - P = 0, + G = this.RunData.Costs[i], + P = this.RunData.Costs[i], H = int.MaxValue, ParentIndex = -1, Position = InvalidPosition @@ -242,6 +244,8 @@ private void RetracePath(NodeData startNode, NativeHashMap closed path.Add(currentNode); currentNode = closedSet[currentNode.ParentIndex]; } + + this.PickedGoal.Add(currentNode); } private bool HasUnresolvableCondition(int currentIndex) @@ -269,13 +273,23 @@ private float UnmetConditionCost(int currentIndex) { if (!this.RunData.ConditionsMet[conditionIndex]) { - // Check if the index exists in the costs array - if (conditionIndex < this.RunData.Costs.Length) - cost += this.RunData.Costs[conditionIndex]; + cost += this.GetCheapestCostForCondition(conditionIndex); } } return cost; } + + private float GetCheapestCostForCondition(int conditionIndex) + { + var cost = float.MaxValue; + foreach (var nodeIndex in this.ConditionConnections.GetValuesForKey(conditionIndex)) + { + if (this.RunData.Costs[nodeIndex] < cost) + cost = this.RunData.Costs[nodeIndex]; + } + + return cost; + } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs index c43ed685..c76b4b3d 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/Interfaces/IResolveHandle.cs @@ -4,6 +4,6 @@ namespace CrashKonijn.Goap.Resolver { public interface IResolveHandle { - IConnectable[] Complete(); + JobResult Complete(); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs b/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs index daf04630..1744cb1d 100644 --- a/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs +++ b/Package/Runtime/CrashKonijn.Goap.Resolver/ResolveHandle.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.Linq; using CrashKonijn.Goap.Core; using Unity.Collections; using Unity.Jobs; +using UnityEngine; namespace CrashKonijn.Goap.Resolver { @@ -41,7 +43,8 @@ public ResolveHandle Start(NativeMultiHashMap nodeConditions, NodeConditions = nodeConditions, ConditionConnections = conditionConnections, RunData = runData, - Result = new NativeList(Allocator.TempJob) + Result = new NativeList(Allocator.TempJob), + PickedGoal = new NativeList(Allocator.TempJob) }; this.handle = this.job.Schedule(); @@ -50,7 +53,7 @@ public ResolveHandle Start(NativeMultiHashMap nodeConditions, } #endif - public IConnectable[] Complete() + public JobResult Complete() { this.handle.Complete(); @@ -61,7 +64,13 @@ public IConnectable[] Complete() this.results.Add(this.graphResolver.GetAction(data.Index)); } + IGoal goal = default; + + if (this.job.PickedGoal.Length > 0) + goal = this.graphResolver.GetGoal(this.job.PickedGoal[0].Index); + this.job.Result.Dispose(); + this.job.PickedGoal.Dispose(); this.job.RunData.StartIndex.Dispose(); this.job.RunData.IsEnabled.Dispose(); @@ -72,7 +81,17 @@ public IConnectable[] Complete() this.graphResolver.Release(this); - return this.results.ToArray(); + return new JobResult + { + Actions = this.results.ToArray(), + Goal = goal + }; } } + + public class JobResult + { + public IConnectable[] Actions { get; set; } + public IGoal Goal { get; set; } + } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs index a75960cc..6d9913f8 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/AgentTypeEvents.cs @@ -39,11 +39,11 @@ public void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction a this.goapEvents?.ActionComplete(actionProvider, action); } - public event AgentGoalDelegate OnNoActionFound; - public void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) + public event AgentGoalRequestDelegate OnNoActionFound; + public void NoActionFound(IMonoGoapActionProvider actionProvider, IGoalRequest request) { - this.OnNoActionFound?.Invoke(actionProvider, goal); - this.goapEvents?.NoActionFound(actionProvider, goal); + this.OnNoActionFound?.Invoke(actionProvider, request); + this.goapEvents?.NoActionFound(actionProvider, request); } public event AgentGoalDelegate OnGoalStart; diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs index cebf1546..10e79618 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoalBase.cs @@ -1,5 +1,7 @@ using System; +using CrashKonijn.Agent.Core; using CrashKonijn.Goap.Core; +using UnityEngine; namespace CrashKonijn.Goap.Runtime { @@ -17,7 +19,7 @@ public void SetConfig(IGoalConfig config) this.config = config; } - public virtual int GetCost(IWorldData data) + public virtual float GetCost(IActionReceiver agent, IComponentReference references) { return this.config.BaseCost; } diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs index ca0e8dd5..b1e5bccb 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionBase.cs @@ -53,7 +53,7 @@ public bool IsValid(IActionReceiver agent, IActionData data) if (goapAgent == null) return false; - if (!goapAgent.AgentType.AllConditionsMet(goapAgent, this)) + if (this.Config.ValidateConditions && !goapAgent.AgentType.AllConditionsMet(goapAgent, this)) { agent.Logger.Warning($"Conditions not met: {this.Config.Name}"); return false; diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs index 9888f41d..954c3bd3 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapActionProvider.cs @@ -1,5 +1,5 @@ using System; -using CrashKonijn.Agent; +using System.Linq; using CrashKonijn.Agent.Core; using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Core; @@ -17,7 +17,7 @@ public class GoapActionProvider : ActionProviderBase, IMonoGoapActionProvider [field: SerializeField] public float DistanceMultiplier { get; set; } = 1f; - + private IAgentType agentType; public IAgentType AgentType { @@ -31,23 +31,12 @@ public IAgentType AgentType this.Events.Bind(this, value.Events); } } - public IGoal CurrentGoal { get; private set; } + public IGoalResult CurrentPlan { get; private set; } + public IGoalRequest GoalRequest { get; private set; } + public ILocalWorldData WorldData { get; } = new LocalWorldData(); - public IConnectable[] CurrentPlan { get; private set; } = Array.Empty(); public IGoapAgentEvents Events { get; } = new GoapAgentEvents(); public ILogger Logger { get; } = new GoapAgentLogger(); - - private IActionReceiver agent; - public IActionReceiver Agent - { - get - { - if (this.agent == null) - this.agent = this.GetComponent(); - - return this.agent; - } - } public Vector3 Position => this.transform.position; @@ -84,49 +73,160 @@ private void OnDisable() this.Events.Unbind(); } - public void SetGoal(bool endAction) + [Obsolete("Use RequestGoal instead.")] + public void SetGoal(bool endAction) where TGoal : IGoal => this.RequestGoal(endAction); + [Obsolete("Use RequestGoal instead.")] + public void SetGoal(IGoal goal, bool endAction) => this.RequestGoal(goal, endAction); + + public void RequestGoal(bool resolve) where TGoal : IGoal { - this.SetGoal(this.AgentType.ResolveGoal(), endAction); + this.RequestGoal(new GoalRequest + { + Goals = new IGoal[] + { + this.AgentType.ResolveGoal() + } + }, resolve); + } + + public void RequestGoal(bool resolve) + where TGoal1 : IGoal + where TGoal2 : IGoal + { + this.RequestGoal(new GoalRequest + { + Goals = new IGoal[] + { + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal() + } + }, resolve); + } + + public void RequestGoal(bool resolve) + where TGoal1 : IGoal + where TGoal2 : IGoal + where TGoal3 : IGoal + { + this.RequestGoal(new GoalRequest + { + Goals = new IGoal[] + { + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal() + } + }, resolve); + } + + public void RequestGoal(bool resolve) + where TGoal1 : IGoal + where TGoal2 : IGoal + where TGoal3 : IGoal + where TGoal4 : IGoal + { + this.RequestGoal(new GoalRequest + { + Goals = new IGoal[] + { + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal() + } + }, resolve); + } + + public void RequestGoal(bool resolve) + where TGoal1 : IGoal + where TGoal2 : IGoal + where TGoal3 : IGoal + where TGoal4 : IGoal + where TGoal5 : IGoal + { + this.RequestGoal(new GoalRequest + { + Goals = new IGoal[] + { + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal(), + this.AgentType.ResolveGoal() + } + }, resolve); } - public void SetGoal(IGoal goal, bool endAction) + public void RequestGoal(IGoal goal, bool resolve) { - if (goal == this.CurrentGoal) + this.RequestGoal(new GoalRequest + { + Goals = new[] { goal } + }, resolve); + } + + public void RequestGoal(IGoalRequest request, bool resolve) + { + if (request == null) return; - this.CurrentGoal = goal; - this.Agent.Timers.Goal.Touch(); + if (this.GoalRequest?.Goals.SequenceEqual(request.Goals) ?? false) + return; - if (this.Agent.ActionState.Action == null) + this.GoalRequest = request; + + if (this.Receiver == null) + return; + + if (resolve) this.ResolveAction(); + } + + public void SetAction(IGoalResult result) + { + this.Logger.Log($"Setting action '{result.Action.GetType().GetGenericTypeName()}' for goal '{result.Goal.GetType().GetGenericTypeName()}'."); - this.Events.GoalStart(goal); + var currentGoal = this.CurrentPlan?.Goal; - if (endAction) - this.StopAction(); + this.CurrentPlan = result; + + if (this.Receiver == null) + return; + + this.Receiver.Timers.Goal.Touch(); + + if (currentGoal != result.Goal) + this.Events.GoalStart(currentGoal); + + this.Receiver.SetAction(this, result.Action, this.WorldData.GetTarget(result.Action)); } - public void SetAction(IGoapAction action, IConnectable[] path) + public void StopAction(bool resolveAction = true) { - this.CurrentPlan = path; - this.Agent.SetAction(this, action, this.WorldData.GetTarget(action)); + this.Receiver.StopAction(resolveAction); } - public void StopAction(bool resolveAction = true) + private IActionReceiver receiver; + public override IActionReceiver Receiver { - this.Agent.StopAction(resolveAction); + get => this.receiver; + set + { + this.receiver = value; + this.Events.Bind(value); + } } - + public override void ResolveAction() { this.Events.Resolve(); - this.Agent.Timers.Resolve.Touch(); + this.Receiver.Timers.Resolve.Touch(); } public void ClearGoal() { - this.CurrentGoal = null; + this.CurrentPlan = null; } public void SetDistanceMultiplierSpeed(float speed) diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs index 6c368afa..70f5f7ca 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapAgentEvents.cs @@ -12,23 +12,34 @@ public void Bind(IMonoGoapActionProvider actionProvider, IAgentTypeEvents events { this.typeEvents = events; this.actionProvider = actionProvider; + } + + public void Bind(IActionReceiver receiver) + { + this.Unbind(); - actionProvider.Agent.Events.OnActionStart += this.ActionStart; - actionProvider.Agent.Events.OnActionEnd += this.ActionEnd; - actionProvider.Agent.Events.OnActionStop += this.ActionStop; - actionProvider.Agent.Events.OnActionComplete += this.ActionComplete; + receiver.Events.OnActionStart += this.ActionStart; + receiver.Events.OnActionEnd += this.ActionEnd; + receiver.Events.OnActionStop += this.ActionStop; + receiver.Events.OnActionComplete += this.ActionComplete; } public void Unbind() { - this.actionProvider.Agent.Events.OnActionStart -= this.ActionStart; - this.actionProvider.Agent.Events.OnActionEnd -= this.ActionEnd; - this.actionProvider.Agent.Events.OnActionStop -= this.ActionStop; - this.actionProvider.Agent.Events.OnActionComplete -= this.ActionComplete; + if (this.actionProvider == null) + return; + + if (this.actionProvider.Receiver == null) + return; + + this.actionProvider.Receiver.Events.OnActionStart -= this.ActionStart; + this.actionProvider.Receiver.Events.OnActionEnd -= this.ActionEnd; + this.actionProvider.Receiver.Events.OnActionStop -= this.ActionStop; + this.actionProvider.Receiver.Events.OnActionComplete -= this.ActionComplete; } - public event GoalDelegate OnNoActionFound; - public void NoActionFound(IGoal goal) + public event GoalRequestDelegate OnNoActionFound; + public void NoActionFound(IGoalRequest goal) { this.OnNoActionFound?.Invoke(goal); this.typeEvents?.NoActionFound(this.actionProvider, goal); diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs index 87c1edfa..2075cc4e 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Behaviours/GoapEvents.cs @@ -28,10 +28,10 @@ public void ActionComplete(IMonoGoapActionProvider actionProvider, IGoapAction a this.OnActionComplete?.Invoke(actionProvider, action); } - public event AgentGoalDelegate OnNoActionFound; - public void NoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) + public event AgentGoalRequestDelegate OnNoActionFound; + public void NoActionFound(IMonoGoapActionProvider actionProvider, IGoalRequest request) { - this.OnNoActionFound?.Invoke(actionProvider, goal); + this.OnNoActionFound?.Invoke(actionProvider, request); } public event AgentGoalDelegate OnGoalStart; diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs index f7d53053..d986f757 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/AgentType.cs @@ -50,10 +50,10 @@ public TGoal ResolveGoal() throw new KeyNotFoundException($"No action found of type {typeof(TGoal)}"); } - public bool AllConditionsMet(IGoapAgent agent, IGoapAction action) + public bool AllConditionsMet(IGoapActionProvider actionProvider, IGoapAction action) { var conditionObserver = this.GoapConfig.ConditionObserver; - conditionObserver.SetWorldData(agent.WorldData); + conditionObserver.SetWorldData(actionProvider.WorldData); foreach (var condition in action.Conditions) { diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs index 0982839d..91a5bc66 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/ActionBuilder.cs @@ -30,6 +30,7 @@ public ActionBuilder(Type actionType, WorldKeyBuilder worldKeyBuilder, TargetKey BaseCost = 1, StoppingDistance = 0.5f, RequiresTarget = true, + ValidateConditions = true, Properties = (IActionProperties)Activator.CreateInstance(propType) }; } @@ -53,6 +54,12 @@ public ActionBuilder SetRequiresTarget(bool requiresTarget) return this; } + public ActionBuilder SetValidateConditions(bool validate) + { + this.config.ValidateConditions = validate; + return this; + } + public ActionBuilder SetStoppingDistance(float inRange) { this.config.StoppingDistance = inRange; diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs index 7a047744..5191785a 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Builders/GoalBuilder.cs @@ -20,7 +20,7 @@ public GoalBuilder(Type type, WorldKeyBuilder worldKeyBuilder) }; } - public GoalBuilder SetBaseCost(int baseCost) + public GoalBuilder SetBaseCost(float baseCost) { this.config.BaseCost = baseCost; return this; diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs index 7b38c26e..9a5d0663 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ManualController.cs @@ -28,17 +28,17 @@ public void OnLateUpdate() } - private void OnAgentResolve(IGoapAgent agent) + private void OnAgentResolve(IGoapActionProvider actionProvider) { - var runner = this.GetRunner(agent); + var runner = this.GetRunner(actionProvider); - runner.Run(new HashSet() { agent as IMonoGoapActionProvider }); + runner.Run(new HashSet() { actionProvider as IMonoGoapActionProvider }); runner.Complete(); } - private IAgentTypeJobRunner GetRunner(IGoapAgent agent) + private IAgentTypeJobRunner GetRunner(IGoapActionProvider actionProvider) { - return this.goap.AgentTypeRunners[agent.AgentType]; + return this.goap.AgentTypeRunners[actionProvider.AgentType]; } } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs index 118a9e3c..13b06470 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ProactiveController.cs @@ -30,7 +30,7 @@ public void OnUpdate() if (agent.IsNull()) continue; - if (agent.Agent.Timers.Resolve.IsRunningFor(this.ResolveTime)) + if (agent.Receiver.Timers.Resolve.IsRunningFor(this.ResolveTime)) { agent.ResolveAction(); } @@ -50,8 +50,11 @@ public void OnUpdate() if (agent.IsNull()) continue; + if (agent.Receiver == null) + continue; + // Update the action sensors for the agent - agent.AgentType.SensorRunner.SenseLocal(agent, agent.Agent.ActionState.Action as IGoapAction); + agent.AgentType.SensorRunner.SenseLocal(agent, agent.Receiver.ActionState.Action as IGoapAction); // agent.Agent.Run(); } @@ -65,7 +68,7 @@ public void OnLateUpdate() } } - private void OnNoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) + private void OnNoActionFound(IMonoGoapActionProvider actionProvider, IGoalRequest request) { this.GetQueue(actionProvider.AgentType).Add(actionProvider); } diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs index 457a545b..36dcb606 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Controllers/ReactiveController.cs @@ -37,8 +37,11 @@ public void OnUpdate() if (agent.IsNull()) continue; + if (agent.Receiver == null) + continue; + // Update the action sensors for the agent - agent.AgentType.SensorRunner.SenseLocal(agent, agent.Agent.ActionState.Action as IGoapAction); + agent.AgentType.SensorRunner.SenseLocal(agent, agent.Receiver.ActionState.Action as IGoapAction); // agent.Agent.Run(); } @@ -52,7 +55,7 @@ public void OnLateUpdate() } } - private void OnNoActionFound(IMonoGoapActionProvider actionProvider, IGoal goal) + private void OnNoActionFound(IMonoGoapActionProvider actionProvider, IGoalRequest request) { this.GetQueue(actionProvider.AgentType).Add(actionProvider); } diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoalRequest.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoalRequest.cs new file mode 100644 index 00000000..2b8a30aa --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoalRequest.cs @@ -0,0 +1,16 @@ +using CrashKonijn.Goap.Core; + +namespace CrashKonijn.Goap.Runtime +{ + public class GoalRequest : IGoalRequest + { + public IGoal[] Goals { get; set; } + } + + public class GoalResult : IGoalResult + { + public IGoal Goal { get; set; } + public IConnectable[] Plan { get; set; } + public IGoapAction Action { get; set; } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoalRequest.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoalRequest.cs.meta new file mode 100644 index 00000000..a6acdce6 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoalRequest.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 87b7e2fc43d04842a1bcb7307af6af11 +timeCreated: 1719932519 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs index 8fbac8ee..c393c9bf 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/GoapAgentLogger.cs @@ -1,4 +1,5 @@ -using CrashKonijn.Agent.Core; +using System.Linq; +using CrashKonijn.Agent.Core; using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Core; @@ -30,7 +31,7 @@ protected override void UnregisterEvents() this.source.Events.OnGoalCompleted -= this.GoalCompleted; } - private void NoActionFound(IGoal goal) => this.Handle($"No action found for goal {goal?.GetType().GetGenericTypeName()}", DebugSeverity.Warning); + private void NoActionFound(IGoalRequest request) => this.Handle($"No action found for goals {string.Join(", ", request.Goals.Select(x => x.GetType().GetGenericTypeName()))}", DebugSeverity.Warning); private void GoalStart(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} started", DebugSeverity.Log); private void GoalCompleted(IGoal goal) => this.Handle($"Goal {goal?.GetType().GetGenericTypeName()} completed", DebugSeverity.Log); diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs index cdd828db..77ca3f69 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/ActionRunState.cs @@ -10,5 +10,6 @@ public static class ActionRunState { public static IActionRunState Wait(float time, bool mayResolve = false) => new WaitActionRunState(time, mayResolve); public static IActionRunState WaitThenComplete(float time, bool mayResolve = false) => new WaitThenCompleteActionRunState(time, mayResolve); public static IActionRunState WaitThenStop(float time, bool mayResolve = false) => new WaitThenStopActionRunState(time, mayResolve); + public static IActionRunState StopAndLog(string message) => new StopAndLog(message); } } \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopAndLog.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopAndLog.cs new file mode 100644 index 00000000..54961827 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopAndLog.cs @@ -0,0 +1,44 @@ +using CrashKonijn.Agent.Core; + +namespace CrashKonijn.Goap.Runtime +{ + public class StopAndLog : IActionRunState + { + private readonly string message; + + public StopAndLog(string message) + { + this.message = message; + } + + public void Update(IAgent agent, IActionContext context) + { + } + + public bool ShouldStop(IAgent agent) + { + agent.Logger.Log(this.message); + return true; + } + + public bool ShouldPerform(IAgent agent) + { + return false; + } + + public bool IsCompleted(IAgent agent) + { + return false; + } + + public bool MayResolve(IAgent agent) + { + return false; + } + + public bool IsRunning() + { + return false; + } + } +} \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopAndLog.cs.meta b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopAndLog.cs.meta new file mode 100644 index 00000000..b9540356 --- /dev/null +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/RunStates/StopAndLog.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b0edbc7b7e964d418402cc4074741b24 +timeCreated: 1719996355 \ No newline at end of file diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs index ca3804c9..ee12718b 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/AgentTypeJobRunner.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using CrashKonijn.Agent.Runtime; using CrashKonijn.Goap.Core; using CrashKonijn.Goap.Resolver; using Unity.Collections; @@ -48,27 +49,32 @@ private void Run(IMonoGoapActionProvider actionProvider) { if (actionProvider.IsNull()) return; - - if (actionProvider.CurrentGoal == null) - return; this.agentType.SensorRunner.SenseLocal(actionProvider); if (this.IsGoalCompleted(actionProvider)) { - var goal = actionProvider.CurrentGoal; + var goal = actionProvider.CurrentPlan; actionProvider.ClearGoal(); - actionProvider.Events.GoalCompleted(goal); - return; + actionProvider.Events.GoalCompleted(goal.Goal); } + var goalRequest = actionProvider.GoalRequest; + + if (goalRequest == null) + return; + this.FillBuilders(actionProvider); - this.resolveHandles.Add(new JobRunHandle(actionProvider) + actionProvider.Logger.Log($"Trying to resolve goals {string.Join(", ", goalRequest.Goals.Select(goal => goal.GetType().GetGenericTypeName()))}"); + + var goalIndexes = goalRequest.Goals.Select(goal => this.resolver.GetIndex(goal)).ToArray(); + + this.resolveHandles.Add(new JobRunHandle(actionProvider, goalRequest) { Handle = this.resolver.StartResolve(new RunData { - StartIndex = new NativeArray(new []{ this.resolver.GetIndex(actionProvider.CurrentGoal) }, Allocator.TempJob), + StartIndex = new NativeArray(goalIndexes, Allocator.TempJob), AgentPosition = actionProvider.Position, IsEnabled = new NativeArray(this.enabledBuilder.Build(), Allocator.TempJob), IsExecutable = new NativeArray(this.executableBuilder.Build(), Allocator.TempJob), @@ -89,6 +95,11 @@ private void FillBuilders(IMonoGoapActionProvider actionProvider) this.executableBuilder.Clear(); this.positionBuilder.Clear(); this.conditionBuilder.Clear(); + + foreach (var goal in this.agentType.GetGoals()) + { + this.costBuilder.SetCost(goal, goal.GetCost(actionProvider.Receiver, actionProvider.Receiver.Injector)); + } foreach (var node in this.agentType.GetActions()) { @@ -107,20 +118,23 @@ private void FillBuilders(IMonoGoapActionProvider actionProvider) var target = actionProvider.WorldData.GetTarget(node); - this.executableBuilder.SetExecutable(node, node.IsExecutable(actionProvider.Agent, allMet)); - this.enabledBuilder.SetEnabled(node, node.IsEnabled(actionProvider.Agent)); - this.costBuilder.SetCost(node, node.GetCost(actionProvider.Agent, actionProvider.Agent.Injector)); + this.executableBuilder.SetExecutable(node, node.IsExecutable(actionProvider.Receiver, allMet)); + this.enabledBuilder.SetEnabled(node, node.IsEnabled(actionProvider.Receiver)); + this.costBuilder.SetCost(node, node.GetCost(actionProvider.Receiver, actionProvider.Receiver.Injector)); this.positionBuilder.SetPosition(node, target?.Position); } } - private bool IsGoalCompleted(IGoapAgent agent) + private bool IsGoalCompleted(IGoapActionProvider actionProvider) { + if (actionProvider.CurrentPlan == null) + return false; + var conditionObserver = this.agentType.GoapConfig.ConditionObserver; - conditionObserver.SetWorldData(agent.WorldData); + conditionObserver.SetWorldData(actionProvider.WorldData); - foreach (var condition in agent.CurrentGoal.Conditions) + foreach (var condition in actionProvider.CurrentPlan.Goal.Conditions) { if (!conditionObserver.IsMet(condition)) return false; @@ -138,17 +152,29 @@ public void Complete() if (resolveHandle.ActionProvider.IsNull()) continue; - var action = result.FirstOrDefault() as IGoapAction; + var goal = result.Goal; + if (goal == null) + { + resolveHandle.ActionProvider.Events.NoActionFound(resolveHandle.GoalRequest); + continue; + } + + var action = result.Actions.FirstOrDefault() as IGoapAction; if (action is null) { - resolveHandle.ActionProvider.Events.NoActionFound(resolveHandle.ActionProvider.CurrentGoal); + resolveHandle.ActionProvider.Events.NoActionFound(resolveHandle.GoalRequest); continue; } - if (action != resolveHandle.ActionProvider.Agent.ActionState.Action) + if (action != resolveHandle.ActionProvider.Receiver.ActionState.Action) { - resolveHandle.ActionProvider.SetAction(action, result); + resolveHandle.ActionProvider.SetAction(new GoalResult + { + Goal = goal, + Plan = result.Actions, + Action = action + }); } } @@ -169,10 +195,12 @@ private class JobRunHandle { public IMonoGoapActionProvider ActionProvider { get; } public IResolveHandle Handle { get; set; } + public IGoalRequest GoalRequest { get; set; } - public JobRunHandle(IMonoGoapActionProvider actionProvider) + public JobRunHandle(IMonoGoapActionProvider actionProvider, IGoalRequest goalRequest) { this.ActionProvider = actionProvider; + this.GoalRequest = goalRequest; } } diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs index c3f54e1c..226e1b7e 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Classes/Runners/SensorRunner.cs @@ -85,7 +85,7 @@ public void SenseLocal(IMonoGoapActionProvider actionProvider) { foreach (var localSensor in this.defaultSet.LocalSensors) { - localSensor.Sense(actionProvider.WorldData, actionProvider.Agent, actionProvider.Agent.Injector); + localSensor.Sense(actionProvider.WorldData, actionProvider.Receiver, actionProvider.Receiver.Injector); } } @@ -101,7 +101,7 @@ public void SenseLocal(IMonoGoapActionProvider actionProvider, IGoapAction actio foreach (var localSensor in set.LocalSensors) { - localSensor.Sense(actionProvider.WorldData, actionProvider.Agent, actionProvider.Agent.Injector); + localSensor.Sense(actionProvider.WorldData, actionProvider.Receiver, actionProvider.Receiver.Injector); } } diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs index f80985fb..c82fd253 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/ActionConfig.cs @@ -12,6 +12,7 @@ public class ActionConfig : IActionConfig public ITargetKey Target { get; set; } public float StoppingDistance { get; set; } public bool RequiresTarget { get; set; } + public bool ValidateConditions { get; set; } public ICondition[] Conditions { get; set; } public IEffect[] Effects { get; set; } public ActionMoveMode MoveMode { get; set; } = ActionMoveMode.MoveBeforePerforming; diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs index 479bacc6..1c97a1ab 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Configs/GoalConfig.cs @@ -20,7 +20,7 @@ public GoalConfig(Type type) public string Name { get; set; } public string ClassType { get; set; } - public int BaseCost { get; set; } + public float BaseCost { get; set; } public List Conditions { get; set; } = new(); public static GoalConfig Create() diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs index 35628362..e128eeb7 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/ActionConfigScriptable.cs @@ -20,7 +20,10 @@ public class ActionConfigScriptable : ScriptableObject, IActionConfig public float StoppingDistance { get; set; } = 0.1f; [field: SerializeField] - public bool RequiresTarget { get; } = true; + public bool RequiresTarget { get; set; } = true; + + [field: SerializeField] + public bool ValidateConditions { get; set; } = true; [field:SerializeField] public ActionMoveMode MoveMode { get; set; } diff --git a/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs index 1566e859..65b11762 100644 --- a/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs +++ b/Package/Runtime/CrashKonijn.Goap.Runtime/Scriptables/GoalConfigScriptable.cs @@ -10,14 +10,14 @@ public class GoalConfigScriptable : ScriptableObject, IGoalConfig { [GoalClass] public string classType; - public int baseCost = 1; + public float baseCost = 1; public List conditions; public string Name => this.name; public List Conditions => this.conditions.Cast().ToList(); - public int BaseCost + public float BaseCost { get => this.baseCost; set => this.baseCost = value; diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs index 8594e7ca..0a1fd290 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentBehaviourTests.cs @@ -29,6 +29,9 @@ public void Setup() this.provider = go.AddComponent(); this.provider.AgentType = this.agentType; + this.provider.Receiver = this.agent; + + this.agent.ActionProvider = this.provider; } [Test] @@ -76,12 +79,19 @@ public void ActionPerform_WithRunStateStop_CallsEnd() this.provider.CallAwake(); this.agent.Initialize(); + var goal = Substitute.For(); + var action = Substitute.For(); action.IsValid(Arg.Any(), Arg.Any()).Returns(true); action.IsInRange(this.agent, Arg.Any(), Arg.Any(), Arg.Any()).Returns(true); action.Perform(this.agent, Arg.Any(), Arg.Any()).Returns(ActionRunState.Stop); - - this.provider.SetAction(action, Array.Empty()); + + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Act this.agent.Run(); @@ -92,7 +102,7 @@ public void ActionPerform_WithRunStateStop_CallsEnd() } [Test] - public void SetGoal_SetsGoal() + public void RequestGoal_SetsGoalRequest() { // Arrange this.agentType.ResolveGoal().Returns(new TestGoal()); @@ -100,76 +110,48 @@ public void SetGoal_SetsGoal() this.provider.AgentType = this.agentType; // Act - this.provider.SetGoal(false); + this.provider.RequestGoal(false); // Assert - this.provider.CurrentGoal.Should().BeOfType(); - } - - [Test] - public void SetGoal_ResolvesAgent() - { - // Arrange - this.agentType.ResolveGoal().Returns(new TestGoal()); - - this.provider.MockEvents(); - - // Act - this.provider.SetGoal(false); - - // Assert - this.provider.Events.Received(1).Resolve(); - } - - [Test] - public void SetGoal_CallsGoalStartEvent() - { - // Arrange - this.agentType.ResolveGoal().Returns(new TestGoal()); - - this.provider.MockEvents(); - - // Act - this.provider.SetGoal(false); - - // Assert - this.provider.Events.Received(1).GoalStart(Arg.Any()); + this.provider.GoalRequest.Goals.Should().ContainItemsAssignableTo(); } [Test] - public void SetGoal_EndActionFalse_DoesntCallEnd() + public void RequestGoal_ResolveFalse_DoesntCallResolve() { // Arrange this.agentType.ResolveGoal().Returns(new TestGoal()); // Set Action property through reflection var action = Substitute.For(); + this.provider.MockEvents(); this.provider.InsertAction(action); // Act - this.provider.SetGoal(false); + this.provider.RequestGoal(false); // Assert - action.Received(0).Stop(Arg.Any(), Arg.Any()); + this.provider.Events.Received(0).Resolve(); } [Test] - public void SetGoal_EndActionTrue_DoesCallEnd() + public void RequestGoal_ResolveTrue_DoesCallResolve() { // Arrange this.agentType.ResolveGoal().Returns(new TestGoal()); - this.agent.ActionResolver = Substitute.For(); + this.agent.ActionProvider = Substitute.For(); // Set Action property through reflection var action = Substitute.For(); + this.provider.MockEvents(); this.provider.InsertAction(action); // Act - this.provider.SetGoal(true); + this.provider.RequestGoal(true); // Assert - action.Received(1).Stop(Arg.Any(), Arg.Any()); + this.provider.Events.Received(1).Resolve(); } [Test] @@ -179,13 +161,19 @@ public void SetAction_SetsAction() this.provider.CallAwake(); this.agent.Initialize(); + var goal = Substitute.For(); var action = Substitute.For(); // Act - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Assert - this.provider.Agent.ActionState.Action.Should().Be(action); + this.provider.Receiver.ActionState.Action.Should().Be(action); } [Test] @@ -195,6 +183,7 @@ public void SetAction_CallsEndOnOldAction() this.provider.CallAwake(); this.agent.Initialize(); + var goal = Substitute.For(); var action = Substitute.For(); // Set Action property through reflection @@ -202,7 +191,12 @@ public void SetAction_CallsEndOnOldAction() this.provider.InsertAction(oldAction); // Act - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Assert oldAction.Received(1).Stop(this.agent, Arg.Any()); @@ -215,10 +209,16 @@ public void SetAction_CallsGetData() this.provider.CallAwake(); this.agent.Initialize(); + var goal = Substitute.For(); var action = Substitute.For(); // Act - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Assert action.Received(1).GetData(); @@ -232,14 +232,21 @@ public void SetAction_StoresData() this.agent.Initialize(); var actionData = Substitute.For(); + var goal = Substitute.For(); + var action = Substitute.For(); action.GetData().Returns(actionData); // Act - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Assert - this.provider.Agent.ActionState.Data.Should().Be(actionData); + this.provider.Receiver.ActionState.Data.Should().Be(actionData); } // TODO @@ -271,10 +278,16 @@ public void SetAction_CallsStartOnAction() this.provider.CallAwake(); this.agent.Initialize(); + var goal = Substitute.For(); var action = Substitute.For(); // Act - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Assert action.Received(1).Start(this.agent, Arg.Any()); @@ -287,6 +300,7 @@ public void SetAction_StoresPath() this.provider.CallAwake(); this.agent.Initialize(); + var goal = Substitute.For(); var action = Substitute.For(); var path = new IConnectable[] { @@ -294,10 +308,15 @@ public void SetAction_StoresPath() }; // Act - this.provider.SetAction(action, path); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = path, + Action = action + }); // Assert - this.provider.CurrentPlan.Should().BeSameAs(path); + this.provider.CurrentPlan.Plan.Should().BeSameAs(path); } [Test] @@ -308,10 +327,16 @@ public void SetAction_CallsActionStartEvent() this.agent.Initialize(); this.agent.MockEvents(); + var goal = Substitute.For(); var action = Substitute.For(); // Act - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Assert this.agent.Events.Received(1).ActionStart(action); @@ -321,7 +346,7 @@ public void SetAction_CallsActionStartEvent() public void EndAction_CallsEndOnAction() { // Arrange - this.agent.ActionResolver = Substitute.For(); + this.agent.ActionProvider = Substitute.For(); this.provider.CallAwake(); this.agent.Initialize(); @@ -343,11 +368,17 @@ public void EndAction_ClearsAction() this.agent.Initialize(); // Act - this.provider.SetAction(Substitute.For(), Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = Substitute.For(), + Plan = Array.Empty(), + Action = Substitute.For() + }); + this.provider.StopAction(); // Assert - this.provider.Agent.ActionState.Action.Should().BeNull(); + this.provider.Receiver.ActionState.Action.Should().BeNull(); } [Test] @@ -358,18 +389,23 @@ public void EndAction_ClearsActionData() this.agent.Initialize(); // Act - this.provider.SetAction(Substitute.For(), Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = Substitute.For(), + Plan = Array.Empty(), + Action = Substitute.For() + }); this.provider.StopAction(); // Assert - this.provider.Agent.ActionState.Data.Should().BeNull(); + this.provider.Receiver.ActionState.Data.Should().BeNull(); } [Test] public void EndAction_ShouldResolveAgent() { // Arrange - this.agent.ActionResolver = this.provider; + this.agent.ActionProvider = this.provider; this.provider.CallAwake(); this.agent.Initialize(); this.provider.MockEvents(); @@ -389,8 +425,14 @@ public void EndAction_CallsActionEndEvent() this.agent.Initialize(); this.agent.MockEvents(); + var goal = Substitute.For(); var action = Substitute.For(); - this.provider.SetAction(action, Array.Empty()); + this.provider.SetAction(new GoalResult + { + Goal = goal, + Plan = Array.Empty(), + Action = action + }); // Act this.provider.StopAction(); diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs index f2591899..ef49896d 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/AgentTypeJobRunnerTests.cs @@ -23,7 +23,7 @@ public void Setup() this.agent = Substitute.For(); this.goapActionProvider = Substitute.For(); - this.goapActionProvider.Agent.Returns(this.agent); + this.goapActionProvider.Receiver.Returns(this.agent); this.goapActionProvider.Position.Returns(Vector3.zero); } @@ -32,10 +32,13 @@ public void Run_UpdatesSensorRunner() { // Arrange var sensorRunner = Substitute.For(); + var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List()); agentType.GoapConfig.Returns(GoapConfig.Default); + agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List()); var resolver = Substitute.For(); @@ -79,6 +82,8 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() var agentType = Substitute.For(); agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List()); + agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List()); agentType.GoapConfig.Returns(GoapConfig.Default); var resolver = Substitute.For(); @@ -94,11 +99,12 @@ public void Run_WithAtLeastOneAgent_SensesGlobalSensors() } [Test] - public void Run_AgentHasNoCurrentGoal_DoesNotRun() + public void Run_AgentHasNoCurrentGoalRequest_DoesNotRun() { // Arrange - this.goapActionProvider.CurrentGoal.ReturnsNull(); - this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentPlan.ReturnsNull(); + this.goapActionProvider.GoalRequest.ReturnsNull(); + this.goapActionProvider.Receiver.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -127,8 +133,15 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - this.goapActionProvider.CurrentGoal.Returns(goal); - this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); + var goalResult = Substitute.For(); + goalResult.Goal.Returns(goal); + + var request = Substitute.For(); + request.Goals.Returns(new [] { goal }); + + this.goapActionProvider.CurrentPlan.Returns(goalResult); + this.goapActionProvider.GoalRequest.Returns(request); + this.goapActionProvider.Receiver.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -136,6 +149,7 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal }); var resolver = Substitute.For(); @@ -149,6 +163,43 @@ public void Run_AgentHasCurrentGoalAndNoAction_Runs() sensorRunner.Received(1).SenseLocal(this.goapActionProvider); resolver.Received(1).StartResolve(Arg.Any()); } + + [Test] + public void Run_AgentHasCurrentGoalAndNoAction_RunsWithMultipleGoals() + { + // Arrange + var goal1 = Substitute.For(); + goal1.Conditions.Returns(new [] { Substitute.For() }); + + var goal2 = Substitute.For(); + goal2.Conditions.Returns(new [] { Substitute.For() }); + + var goalRequest = Substitute.For(); + goalRequest.Goals.Returns(new [] { goal1, goal2 }); + + this.goapActionProvider.GoalRequest.Returns(goalRequest); + this.goapActionProvider.Receiver.ActionState.Action.ReturnsNull(); + + var sensorRunner = Substitute.For(); + + var agentType = Substitute.For(); + agentType.SensorRunner.Returns(sensorRunner); + agentType.GetAllNodes().Returns(new List { goal1, goal2 }); + agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal1, goal2 }); + + var resolver = Substitute.For(); + + var runner = new AgentTypeJobRunner(agentType, resolver); + + // Act + runner.Run(new HashSet() { this.goapActionProvider }); + runner.Dispose(); + + // Assert + sensorRunner.Received(1).SenseLocal(this.goapActionProvider); + resolver.Received(1).StartResolve(Arg.Is(x => x.StartIndex.Length == 2)); + } [Test] public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() @@ -156,9 +207,12 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() // Arrange var goal = Substitute.For(); goal.Conditions.Returns(new []{ Substitute.For() }); + + var goalResult = Substitute.For(); + goalResult.Goal.Returns(goal); - this.goapActionProvider.CurrentGoal.Returns(goal); - this.goapActionProvider.Agent.ActionState.Action.Returns(Substitute.For()); + this.goapActionProvider.CurrentPlan.Returns(goalResult); + this.goapActionProvider.Receiver.ActionState.Action.Returns(Substitute.For()); var sensorRunner = Substitute.For(); @@ -166,6 +220,7 @@ public void Run_AgentHasCurrentGoalAndDoesHaveAction_Runs() agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal }); var resolver = Substitute.For(); @@ -186,9 +241,16 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() // Arrange var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); + + var goalResult = Substitute.For(); + goalResult.Goal.Returns(goal); + + var request = Substitute.For(); + request.Goals.Returns(new [] { goal }); - this.goapActionProvider.CurrentGoal.Returns(goal); - this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.GoalRequest.Returns(request); + this.goapActionProvider.CurrentPlan.Returns(goalResult); + this.goapActionProvider.Receiver.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -196,6 +258,7 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal }); agentType.GoapConfig.ConditionObserver.IsMet(Arg.Any()).Returns(true); @@ -209,8 +272,8 @@ public void Run_AgentHasCompletedGoal_CallsGoalCompleteEvent() // Assert sensorRunner.Received(1).SenseLocal(this.goapActionProvider); - resolver.Received(0).StartResolve(Arg.Any()); - this.goapActionProvider.Events.Received(1).GoalCompleted(this.goapActionProvider.CurrentGoal); + resolver.Received(1).StartResolve(Arg.Any()); + this.goapActionProvider.Events.Received(1).GoalCompleted(goal); } [Test] @@ -219,9 +282,12 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() // Arrange var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); + + var goalResult = Substitute.For(); + goalResult.Goal.Returns(goal); - this.goapActionProvider.CurrentGoal.Returns(goal); - this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); + this.goapActionProvider.CurrentPlan.Returns(goalResult); + this.goapActionProvider.Receiver.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -229,6 +295,7 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal }); agentType.GoapConfig.ConditionObserver.IsMet(Arg.Any()).Returns(false); @@ -243,7 +310,7 @@ public void Run_AgentHasNotCompletedGoal_DoesntCallGoalCompleteEvent() // Assert sensorRunner.Received(1).SenseLocal(this.goapActionProvider); resolver.Received(1).StartResolve(Arg.Any()); - this.goapActionProvider.Events.Received(0).GoalCompleted(this.goapActionProvider.CurrentGoal); + this.goapActionProvider.Events.Received(0).GoalCompleted(goal); } [Test] @@ -252,11 +319,14 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() // Arrange var goal = Substitute.For(); goal.Conditions.Returns(new [] { Substitute.For() }); - + var action = Substitute.For(); - this.goapActionProvider.CurrentGoal.Returns(goal); - this.goapActionProvider.Agent.ActionState.Action.ReturnsNull(); + var goalResult = Substitute.For(); + goalResult.Goal.Returns(goal); + + this.goapActionProvider.CurrentPlan.Returns(goalResult); + this.goapActionProvider.Receiver.ActionState.Action.ReturnsNull(); var sensorRunner = Substitute.For(); @@ -264,9 +334,14 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal }); var handle = Substitute.For(); - handle.Complete().Returns(new IConnectable[] { action }); + handle.Complete().Returns(new JobResult + { + Goal = goal, + Actions = new IConnectable[] { action } + }); var resolver = Substitute.For(); resolver.StartResolve(Arg.Any()).Returns(handle); @@ -278,7 +353,8 @@ public void Run_AgentHasCurrentGoalAndNoAction_SetsTheActionOnAgent() runner.Complete(); // Assert - this.goapActionProvider.Received(1).SetAction(action, Arg.Any()); + // this.goapActionProvider.Received(1).SetAction(goal, action, Arg.Any()); + this.goapActionProvider.Received(1).SetAction(Arg.Any()); } [Test] @@ -290,8 +366,11 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() var action = Substitute.For(); - this.goapActionProvider.CurrentGoal.Returns(goal); - this.goapActionProvider.Agent.ActionState.Action.Returns(action); + var goalResult = Substitute.For(); + goalResult.Goal.Returns(goal); + + this.goapActionProvider.CurrentPlan.Returns(goalResult); + this.goapActionProvider.Receiver.ActionState.Action.Returns(action); var sensorRunner = Substitute.For(); @@ -299,9 +378,14 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() agentType.SensorRunner.Returns(sensorRunner); agentType.GetAllNodes().Returns(new List { goal }); agentType.GetActions().Returns(new List()); + agentType.GetGoals().Returns(new List() { goal }); var handle = Substitute.For(); - handle.Complete().Returns(new IConnectable[] { action }); + handle.Complete().Returns(new JobResult + { + Goal = goal, + Actions = new IConnectable[] { action } + }); var resolver = Substitute.For(); resolver.StartResolve(Arg.Any()).Returns(handle); @@ -313,7 +397,7 @@ public void Run_AgentHasCurrentGoalAndAction_ResolvingSameActionDoesntCallSet() runner.Complete(); // Assert - this.goapActionProvider.Received(0).SetAction(Arg.Any(), Arg.Any()); + this.goapActionProvider.Received(0).SetAction(Arg.Any()); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs index 7e73f370..39d0858b 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/GraphResolverTests.cs @@ -98,7 +98,7 @@ public void Resolve_WithNoActions_ReturnsEmptyList() resolver.Dispose(); // Assert - result.Should().BeEmpty(); + result.Actions.Should().BeEmpty(); } [Test] @@ -137,8 +137,48 @@ public void Resolve_WithOneExecutableConnection_ReturnsAction() resolver.Dispose(); // Assert - result.Should().HaveCount(1); - result.First().Should().Be(action); + result.Actions.Should().HaveCount(1); + result.Actions.First().Should().Be(action); + } + + [Test] + public void Resolve_WithOneExecutableConnection_ReturnsGoal() + { + // Arrange + var connection = new TestConnection("connection"); + var goal = new TestGoal("goal") + { + Conditions = new ICondition[] { connection } + }.ToMock(); + var action = new TestAction("action") + { + Effects = new IEffect[] { connection } + }.ToMock(); + + var actions = new IConnectable[] { goal, action }; + var resolver = new GraphResolver(actions, new TestKeyResolver()); + + // Act + var handle = resolver.StartResolve(new RunData + { + StartIndex = new NativeArray(new [] { 0 }, Allocator.TempJob), + AgentPosition = Vector3.zero, + IsEnabled = new NativeArray(new []{ true, true }, Allocator.TempJob), + IsExecutable = new NativeArray(new [] { false, true }, Allocator.TempJob), + Positions = new NativeArray(new []{ float3.zero, float3.zero }, Allocator.TempJob), + Costs = new NativeArray(new []{ 1f, 1f }, Allocator.TempJob), + ConditionsMet = new NativeArray(new [] { false }, Allocator.TempJob), + DistanceMultiplier = 1f + }); + + var result = handle.Complete(); + + // Cleanup + resolver.Dispose(); + + // Assert + result.Actions.Should().HaveCount(1); + result.Goal.Should().Be(goal); } [Test] @@ -186,8 +226,8 @@ public void Resolve_WithMultipleConnections_ReturnsExecutableAction() resolver.Dispose(); // Assert - result.Should().HaveCount(1); - result.First().Should().Be(thirdAction); + result.Actions.Should().HaveCount(1); + result.Actions.First().Should().Be(thirdAction); } [Test] @@ -247,8 +287,8 @@ public void Resolve_WithNestedConnections_ReturnsExecutableAction() resolver.Dispose(); // Assert - result.Should().HaveCount(2); - result.Should().Equal(action11, action1); + result.Actions.Should().HaveCount(2); + result.Actions.Should().Equal(action11, action1); } [Test] @@ -324,8 +364,8 @@ public void Resolve_ShouldIncludeLocationHeuristics() resolver.Dispose(); // Assert - result.Should().HaveCount(3); - result.Should().Equal(action111, action11, action1); + result.Actions.Should().HaveCount(3); + result.Actions.Should().Equal(action111, action11, action1); } [Test] @@ -398,8 +438,8 @@ public void Resolve_ShouldIncludeCostHeuristics() resolver.Dispose(); // Assert - result.Should().HaveCount(3); - result.Should().Equal(action111, action11, action1); + result.Actions.Should().HaveCount(3); + result.Actions.Should().Equal(action111, action11, action1); } [TestCase(true)] @@ -481,12 +521,12 @@ public void Resolve_ShouldUseDistanceMultiplier(bool close) resolver.Dispose(); // Assert - result.Should().HaveCount(2); + result.Actions.Should().HaveCount(2); if (close) - result.Should().Equal(closeAction, rootAction); + result.Actions.Should().Equal(closeAction, rootAction); else - result.Should().Equal(farAction, rootAction); + result.Actions.Should().Equal(farAction, rootAction); } [Test] @@ -550,8 +590,8 @@ public void Resolve_ShouldNotResolve_CompletedCondition() resolver.Dispose(); // Assert - result.Should().HaveCount(2); - result.Should().Equal(incompleteAction, rootAction); + result.Actions.Should().HaveCount(2); + result.Actions.Should().Equal(incompleteAction, rootAction); } [Test] @@ -615,8 +655,8 @@ public void Resolve_ShouldNotResolve_ActionWithFalseConditionWithoutConnections( resolver.Dispose(); // Assert - result.Should().HaveCount(1); - result.Should().Equal(expensiveAction); + result.Actions.Should().HaveCount(1); + result.Actions.Should().Equal(expensiveAction); } [Test] @@ -681,8 +721,8 @@ public void Resolve_ShouldNotResolve_DisabledAction() resolver.Dispose(); // Assert - result.Should().HaveCount(2); - result.Should().Equal(enabledAction, rootAction); + result.Actions.Should().HaveCount(2); + result.Actions.Should().Equal(enabledAction, rootAction); } [Test] @@ -754,8 +794,8 @@ public void Resolve_ShouldNotResolve_ChildOfDisabledAction() resolver.Dispose(); // Assert - result.Should().HaveCount(2); - result.Should().Equal(enabledAction, rootAction); + result.Actions.Should().HaveCount(2); + result.Actions.Should().Equal(enabledAction, rootAction); } [Test] @@ -826,8 +866,8 @@ public void Resolve_Should_UseDistanceCorrectly() resolver.Dispose(); // Assert - result.Should().HaveCount(2); - result.Should().Equal(closeAction, rootAction); + result.Actions.Should().HaveCount(2); + result.Actions.Should().Equal(closeAction, rootAction); } [TestCase(true)] @@ -898,8 +938,8 @@ public void Resolve_Should_HandleMultipleStartIndex(bool one) resolver.Dispose(); // Assert - result.Should().HaveCount(1); - result.Should().Equal(one ? rootAction1 : rootAction2); + result.Actions.Should().HaveCount(1); + result.Actions.Should().Equal(one ? rootAction1 : rootAction2); } [Test] @@ -979,8 +1019,8 @@ public void Resolve_Should_UseUnmetConditionsInHeuristics() resolver.Dispose(); // Assert - result.Should().HaveCount(1); - result.Should().Equal(expensiveAction); + result.Actions.Should().HaveCount(1); + result.Actions.Should().Equal(expensiveAction); } } } \ No newline at end of file diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs index 9e8d5234..27ceeb48 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/ProactiveControllerTests.cs @@ -46,7 +46,7 @@ public void SetUp() public void OnUpdate_ResolveActionCalledWhenResolveTimeExpired() { // Arrange - this.actionProvider.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(true); + this.actionProvider.Receiver.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(true); this.goap.Agents.Returns(new List() { this.actionProvider }); this.proactiveController.Initialize(this.goap); @@ -63,7 +63,7 @@ public void OnUpdate_ResolveActionNotCalledWhenResolveTimeNotExpired() { // Arrange this.actionProvider = Substitute.For(); - this.actionProvider.Agent.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(false); + this.actionProvider.Receiver.Timers.Resolve.IsRunningFor(this.proactiveController.ResolveTime).Returns(false); this.goap.Agents.Returns(new List() { this.actionProvider }); this.proactiveController.Initialize(this.goap); diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs index 1494f5cc..b46ac481 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/SensorRunnerTests.cs @@ -87,7 +87,7 @@ public void SenseLocal_LocalSensor_CallsSense() runner.SenseLocal(agent); // Assert - sensor.Received().Sense(Arg.Any(), agent.Agent, Arg.Any()); + sensor.Received().Sense(Arg.Any(), agent.Receiver, Arg.Any()); } [Test] @@ -105,7 +105,7 @@ public void SenseLocal_MultiSensor_CallsSense() runner.SenseLocal(agent); // Assert - sensor.Received().Sense(Arg.Any(), agent.Agent, Arg.Any()); + sensor.Received().Sense(Arg.Any(), agent.Receiver, Arg.Any()); } [Test] diff --git a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs index f8233f82..688d3f78 100644 --- a/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs +++ b/Package/Tests/CrashKonijn.Goap.Tests/UnitTests/Support/Extensions.cs @@ -50,13 +50,13 @@ public static void CallOnDisable(this T behaviour) .Invoke(behaviour, null); } - public static IGoapAgentEvents MockEvents(this IGoapAgent agent) + public static IGoapAgentEvents MockEvents(this IGoapActionProvider actionProvider) { var events = Substitute.For(); // Set Events property through reflection typeof(GoapActionProvider) .GetField("k__BackingField", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)! - .SetValue(agent, events); + .SetValue(actionProvider, events); return events; } @@ -72,9 +72,9 @@ public static IAgentEvents MockEvents(this IAgent agent) return events; } - public static void InsertAction(this GoapActionProvider agent, IAction action) + public static void InsertAction(this GoapActionProvider provider, IAction action) { - agent.Agent.InsertAction(action); + provider.Receiver.InsertAction(action); } public static void InsertAction(this IActionReceiver agent, IAction action)