From 8f56d99bf7d4cd95f64aff11d6ec2124e4318b9f Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Thu, 21 Aug 2025 16:40:49 +0900 Subject: [PATCH 01/12] =?UTF-8?q?=EC=86=90=EB=8B=98=20=EB=B9=84=ED=97=A4?= =?UTF-8?q?=EC=9D=B4=EB=B9=84=EC=96=B4=20=ED=8A=B8=EB=A6=AC=20=EC=B4=88?= =?UTF-8?q?=EC=95=88=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Environments/Props/Prop_Open.prefab | 2 +- .../AI/Customer/Subtree/CustomerDefault.asset | 4 +- .../Prop/MenuBoard/PropMenuBoard.prefab | 4 +- .../_Addressables/Prefabs/CustomerNpc.prefab | 1044 ++++++++++++++++- .../Prefabs/RestaurantNpc.prefab | 12 +- .../Prefabs/RestaurantPlayer.prefab | 33 + .../AutoCreated/So/EnvironmentDataSo.asset | 2 +- .../_DDD/_Scripts/RestaurantCharacter/AI.meta | 3 + .../AI/RestaurantCustomerAiComponent.cs | 57 + .../AI/RestaurantCustomerAiComponent.cs.meta | 3 + .../RestaurantCustomerBlackboardComponent.cs | 21 + ...taurantCustomerBlackboardComponent.cs.meta | 3 + .../Interfaces/IRestaurantCustomerAi.cs | 7 + .../Interfaces/IRestaurantCustomerAi.cs.meta | 3 + .../IRestaurantCustomerBlackboard.cs | 13 + .../IRestaurantCustomerBlackboard.cs.meta | 3 + .../Npc/Customer/CustomerCharacter.cs | 45 +- .../Npc/RestaurantNpcCharacter.cs | 6 +- .../Player/RestaurantPlayerCharacter.cs | 3 + .../Conrtollers/RestaurantRunController.cs | 13 +- .../Run/Customer/CustomerFactory.cs | 64 +- .../RestaurantOrderInteractionSubsystem.cs | 2 + .../Solvers/RestaurantOrderSolver.cs | 4 +- .../RestaurantOrderSolver_Busy.cs | 19 + .../RestaurantOrderSolver_Busy.cs.meta | 3 + .../RestaurantOrderSolver_Dirty.cs | 19 + .../RestaurantOrderSolver_Dirty.cs.meta | 3 + .../FlowStates/RestaurantCustomerState.cs | 97 ++ ProjectSettings/EditorBuildSettings.asset | 2 +- 29 files changed, 1424 insertions(+), 70 deletions(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs.meta diff --git a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab index e3535c2f0..1cc1d7f89 100644 --- a/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab +++ b/Assets/_DDD/Restaurant/Environments/Props/Prop_Open.prefab @@ -136,7 +136,7 @@ MonoBehaviour: m_EditorClassIdentifier: _interactionType: 1 _executionParameters: - _holdTime: 1 + _holdTime: 0.1 _displayParameters: _messageKey: _interactionAvailableFlows: 1 diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index f1f9e1f9b..fa318032c 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd8483b8226cbda88852b05e1285b9603516dfd5842972a2e379a43cb91b9a96 -size 676 +oid sha256:948390052ce3eddb7f00b5d0f3286b789c8298f4f327a7843304e44f8a2e6513 +size 87077 diff --git a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab index 149bc761d..998c780c5 100644 --- a/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab +++ b/Assets/_DDD/_Addressables/Environments/Prop/MenuBoard/PropMenuBoard.prefab @@ -120,11 +120,12 @@ MonoBehaviour: m_EditorClassIdentifier: _interactionType: 1 _executionParameters: - _holdTime: 1 + _holdTime: 0 _displayParameters: _messageKey: _interactionAvailableFlows: 1 _aiInteractionPoints: [] + autoInitialize: 1 --- !u!114 &4545680930728379745 MonoBehaviour: m_ObjectHideFlags: 0 @@ -377,3 +378,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1235f6bde9304d8f85079f2777bd4b3c, type: 3} m_Name: m_EditorClassIdentifier: + _managementType: 0 diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index 4ac33db37..4091378b7 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -9,12 +9,1048 @@ PrefabInstance: m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} - propertyPath: m_Subtree - value: + propertyPath: m_Data.m_UniqueID + value: 2072347169 objectReference: {fileID: 0} - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} - propertyPath: m_GraphName - value: CustomerBehavior + propertyPath: m_Data.m_TaskData.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventTaskData.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_SharedVariableData.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_TaskData.Array.data[0].m_Version + value: 3.4 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventNodePropertiesData.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_LogicNodePropertiesData.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_TaskData.Array.data[0].m_ObjectType + value: Opsive.BehaviorDesigner.Runtime.Tasks.Actions.StackedAction + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventTaskData.Array.data[0].m_Version + value: 3.4 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventTaskData.Array.data[0].m_ObjectType + value: Opsive.BehaviorDesigner.Runtime.Tasks.Events.Start + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_TaskData.Array.data[0].m_Values.Array.size + value: 14 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[2]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[3]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[4]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[5]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[6]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[10]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[11]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[12]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[13]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[14]' + value: 118 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[15]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[16]' + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[17]' + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[18]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[19]' + value: 104 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[20]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[21]' + value: 118 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[22]' + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[23]' + value: 111 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[24]' + value: 114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[25]' + value: 68 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[26]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[27]' + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[28]' + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[29]' + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[30]' + value: 110 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[31]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[32]' + value: 114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[33]' + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[34]' + value: 82 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[35]' + value: 117 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[36]' + value: 110 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[37]' + value: 116 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[38]' + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[39]' + value: 109 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[40]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[41]' + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[42]' + value: 84 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[43]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[44]' + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[45]' + value: 107 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[46]' + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[47]' + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[48]' + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[49]' + value: 99 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[50]' + value: 116 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[51]' + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[52]' + value: 111 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[53]' + value: 110 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[54]' + value: 115 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[55]' + value: 46 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[56]' + value: 83 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[57]' + value: 116 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[58]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[59]' + value: 114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[60]' + value: 116 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[61]' + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[62]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[63]' + value: 104 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[64]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[65]' + value: 118 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[66]' + value: 105 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[67]' + value: 111 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[68]' + value: 114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[69]' + value: 84 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[70]' + value: 114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[71]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[72]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[74]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[75]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[76]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[77]' + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_Values.Array.data[79]' + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventNodePropertiesData.Array.data[0].m_Version + value: 3.4 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventTaskData.Array.data[0].m_Values.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_LogicNodePropertiesData.Array.data[0].m_Version + value: 3.4 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_TaskData.Array.data[0].m_UnityObjects.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventNodePropertiesData.Array.data[0].m_ObjectType + value: Opsive.GraphDesigner.Runtime.NodeProperties + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventTaskData.Array.data[0].m_Values.Array.data[0]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventTaskData.Array.data[0].m_Values.Array.data[1]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_LogicNodePropertiesData.Array.data[0].m_ObjectType + value: Opsive.GraphDesigner.Runtime.LogicNodeProperties + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.size + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.size + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[1]' + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[2]' + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[3]' + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[4]' + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[5]' + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[6]' + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[7]' + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[8]' + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[9]' + value: 74 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[0]' + value: 2962117259717031728 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[1]' + value: 7266922542588021606 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[2]' + value: 7366259733513172608 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[3]' + value: 6380291040478046818 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[4]' + value: -8530567197348880156 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[5]' + value: -3957478287605629114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[6]' + value: -1500117594402502404 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[7]' + value: -8367522328533733813 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[8]' + value: -2139127302081178988 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[9]' + value: -4449977117559057706 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[10]' + value: 78 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[11]' + value: 78 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[12]' + value: 78 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[13]' + value: 78 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[14]' + value: 79 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[15]' + value: 83 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_ValuePositions.Array.data[16]' + value: 83 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventTaskData.Array.data[0].m_ValuePositions.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[10]' + value: 1600038550733978463 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[11]' + value: 5078256361681572446 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[12]' + value: 2789843053411464425 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[13]' + value: 256556895345464718 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[14]' + value: 8465553906751671549 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[15]' + value: -8530567197348880156 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_TaskData.Array.data[0].m_LongValueHashes.Array.data[16]' + value: -3957478287605629114 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventTaskData.Array.data[0].m_LongValueHashes.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.size + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.size + value: 74 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventTaskData.Array.data[0].m_LongValueHashes.Array.data[0]' + value: -5674111636788395943 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[0]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[1]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[2]' + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[3]' + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[4]' + value: 53 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[5]' + value: 49 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[6]' + value: 102 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[7]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[8]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[9]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[0]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[1]' + value: 99 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[2]' + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[3]' + value: 99 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[4]' + value: 55 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[5]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[6]' + value: 51 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[7]' + value: 102 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[8]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[9]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[10]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[11]' + value: 57 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[12]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[13]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[14]' + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[15]' + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[16]' + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[17]' + value: 57 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[18]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[19]' + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[20]' + value: 102 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[21]' + value: 51 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[22]' + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[23]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[24]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[25]' + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[26]' + value: 51 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[27]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[28]' + value: 53 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[29]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[30]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[31]' + value: 49 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[32]' + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[33]' + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[34]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[35]' + value: 53 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[38]' + value: 112 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[39]' + value: 67 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[42]' + value: 240 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[43]' + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[46]' + value: 220 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_Values.Array.data[47]' + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[10]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[11]' + value: 49 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[12]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[13]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[14]' + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[15]' + value: 99 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[16]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[17]' + value: 102 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[18]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[19]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[20]' + value: 57 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[21]' + value: 101 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[22]' + value: 57 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[23]' + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[24]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[25]' + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[26]' + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[27]' + value: 53 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[28]' + value: 97 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[29]' + value: 98 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[30]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[31]' + value: 49 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[32]' + value: 52 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[33]' + value: 56 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[34]' + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[35]' + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[38]' + value: 112 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[39]' + value: 67 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[41]' + value: 128 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[42]' + value: 138 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[43]' + value: 67 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[46]' + value: 232 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[47]' + value: 66 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[69]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[70]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[71]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_Values.Array.data[72]' + value: 255 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.size + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.size + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.size + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.size + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[1]' + value: 36 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[2]' + value: 44 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[3]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[4]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[5]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[6]' + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[1]' + value: 36 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[2]' + value: 44 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[3]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[4]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[5]' + value: 48 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[6]' + value: 64 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[7]' + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[8]' + value: 69 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[9]' + value: 69 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[0]' + value: 5480985131265888956 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[1]' + value: -7644563576402514701 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[2]' + value: 2962117259702096269 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[3]' + value: 7257299673358305469 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[4]' + value: 2962820280256717871 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[5]' + value: 2813741625700550223 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_EventNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[6]' + value: 268198477668590510 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[0]' + value: 5480985131265888956 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[1]' + value: -7644563576402514701 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[2]' + value: 2962117259702096269 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[3]' + value: 7257299673358305469 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[4]' + value: 2962820280256717871 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[5]' + value: 2813741625700550223 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[6]' + value: 268198477668590510 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[7]' + value: 1580835718119765152 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[8]' + value: 1324498323093618261 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[9]' + value: -5519571879738437719 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[10]' + value: 71 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_ValuePositions.Array.data[11]' + value: 73 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[10]' + value: -4446844345799519105 + objectReference: {fileID: 0} + - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: 'm_Data.m_LogicNodePropertiesData.Array.data[0].m_LongValueHashes.Array.data[11]' + value: 8870558515320684346 objectReference: {fileID: 0} - target: {fileID: 3971935000603232885, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_LocalPosition.x diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab index d3008f683..992df8657 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantNpc.prefab @@ -234,10 +234,18 @@ MonoBehaviour: m_Data: m_TaskData: [] m_EventTaskData: [] - m_SharedVariableData: [] + m_SharedVariableData: + - m_ObjectType: 'Opsive.GraphDesigner.Runtime.Variables.SharedVariable`1[[UnityEngine.GameObject, + UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]' + m_ValueHashes: + m_LongValueHashes: 0d00eb254f8d1b29baa620a07799d549a996976a4a64278927dafeacd28e0b00 + m_ValuePositions: 000000000e0000000e0000000f000000 + m_Values: 53656c6647616d654f626a65637402ffffffff + m_UnityObjects: [] + m_Version: 3.4 m_DisabledEventNodesData: [] m_DisabledLogicNodesData: [] - m_UniqueID: -1885404201 + m_UniqueID: 1495981264 m_LogicNodePropertiesData: [] m_EventNodePropertiesData: [] m_GroupPropertiesData: [] diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab index cc9051a7a..a66d69676 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab @@ -366,6 +366,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} insertIndex: -1 addedObject: {fileID: 8993310060139522557} + - targetCorrespondingSourceObject: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} + insertIndex: -1 + addedObject: {fileID: -6848683434426724985} - targetCorrespondingSourceObject: {fileID: 6791841979869644848, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} insertIndex: -1 addedObject: {fileID: 662634663174340165} @@ -461,6 +464,36 @@ MonoBehaviour: m_EditorClassIdentifier: blockOutlineAndGlow: 1 blockOverlay: 1 +--- !u!114 &-6848683434426724985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7316134055819320434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cdaa3305fa954c45a80c9662aa6f425, type: 3} + m_Name: + m_EditorClassIdentifier: + m_GraphName: Behavior Tree + m_Index: 0 + m_Data: + m_TaskData: [] + m_EventTaskData: [] + m_SharedVariableData: [] + m_DisabledEventNodesData: [] + m_DisabledLogicNodesData: [] + m_UniqueID: 732308450 + m_LogicNodePropertiesData: [] + m_EventNodePropertiesData: [] + m_GroupPropertiesData: [] + m_StartWhenEnabled: 1 + m_PauseWhenDisabled: 0 + m_UpdateMode: 0 + m_EvaluationType: 0 + m_MaxEvaluationCount: 1 + m_Subtree: {fileID: 0} --- !u!4 &7511707580127947132 stripped Transform: m_CorrespondingSourceObject: {fileID: 4993183601549197863, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3} diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset index d1b5123d1..98082d99f 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/AutoCreated/So/EnvironmentDataSo.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:863b433c27804f5f08c20382a8565fcfa5d4f79c61a0941ba31545db5031e660 +oid sha256:12badc6747a2bc25c321281b29f30d2397cd92a81d87cabed61151c0fb1a65bb size 1534 diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI.meta new file mode 100644 index 000000000..c89e792df --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1fed3b9fae5245cdbf255f627a82a1e6 +timeCreated: 1755747969 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs new file mode 100644 index 000000000..6206ce2fb --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs @@ -0,0 +1,57 @@ +using System; +using System.Threading.Tasks; +using Opsive.BehaviorDesigner.Runtime; +using Unity.Entities; +using UnityEngine; +using UnityEngine.AddressableAssets; + +namespace DDD +{ + [RequireComponent(typeof(BehaviorTree))] + [RequireComponent(typeof(RestaurantCustomerBlackboardComponent))] + public class RestaurantCustomerAiComponent : MonoBehaviour, IRestaurantCustomerAi + { + protected BehaviorTree _behaviorTree; + protected RestaurantCustomerBlackboardComponent _blackboardComponent; + + private void Awake() + { + _behaviorTree = GetComponent(); + _blackboardComponent = GetComponent(); + } + + public void InitializeAi(CustomerData inCustomerData) + { + try + { + InitializeAiInternal(inCustomerData); + } + catch (Exception e) + { + // Log + Debug.LogError(e); + throw; // TODO 예외 처리 + } + } + + private async Task InitializeAiInternal(CustomerData inCustomerData) + { + var customerState = RestaurantState.Instance.CustomerState; + var subtree = customerState.GetLoadedSubtree(inCustomerData.CustomerType); + + if (subtree == null) + { + Debug.LogError( + $"[CustomerCharacter] No preloaded subtree found for CustomerType: {inCustomerData.CustomerType}. Make sure CustomerBehaviorData is loaded."); + subtree = await customerState.GetOrLoadSubtree(inCustomerData.CustomerType); + } + + _behaviorTree.Subgraph = subtree; + _blackboardComponent.InitializeWithBehaviorTree(subtree); + _blackboardComponent.SetCustomerData(inCustomerData); + // TODO : 1. Subtree - Action, Condition + // TODO : 2. Blackboard + _behaviorTree.StartBehavior(); + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs.meta new file mode 100644 index 000000000..42084712a --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: af69e82818254bfa9cabb2dbf9430850 +timeCreated: 1755748000 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs new file mode 100644 index 000000000..f042b9227 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs @@ -0,0 +1,21 @@ +using Opsive.BehaviorDesigner.Runtime; +using UnityEngine; + +namespace DDD +{ + public class RestaurantCustomerBlackboardComponent : MonoBehaviour, IRestaurantCustomerBlackboard + { + private Subtree _subtree; + + public void InitializeWithBehaviorTree(Subtree subtree) + { + _subtree = subtree; + _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.SelfGameObject), gameObject); + } + + public void SetCustomerData(CustomerData inCustomerData) + { + _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.CustomerData), inCustomerData);; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs.meta new file mode 100644 index 000000000..f4ab0960a --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 784c770c13244dc0a0804056065eaf92 +timeCreated: 1755748886 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs new file mode 100644 index 000000000..785b8bb03 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs @@ -0,0 +1,7 @@ +namespace DDD +{ + public interface IRestaurantCustomerAi + { + void InitializeAi(CustomerData inCustomerData); + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs.meta new file mode 100644 index 000000000..0aae47e45 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerAi.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 308488f2a02448d3853514eff04711fa +timeCreated: 1755748296 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs new file mode 100644 index 000000000..bc261391b --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs @@ -0,0 +1,13 @@ +namespace DDD +{ + public enum RestaurantCustomerBlackboardKey + { + SelfGameObject, + CustomerData, + } + + public interface IRestaurantCustomerBlackboard + { + void SetCustomerData(CustomerData inCustomerData); + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs.meta new file mode 100644 index 000000000..694439b41 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a4f20d91da7045e4bc226be60254ef2b +timeCreated: 1755748894 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/Customer/CustomerCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/Customer/CustomerCharacter.cs index 372a58980..bba008853 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/Customer/CustomerCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/Customer/CustomerCharacter.cs @@ -5,48 +5,25 @@ namespace DDD { + [RequireComponent(typeof(RestaurantCustomerAiComponent))] public class CustomerCharacter : RestaurantNpcCharacter, ICustomerInitializer { private CustomerData _customerData; - - public async void Initialize(CustomerData customerData) + protected IRestaurantCustomerAi restaurantCustomerAi; + + protected override void Awake() + { + base.Awake(); + restaurantCustomerAi = GetComponent(); + } + + public void Initialize(CustomerData customerData) { _customerData = customerData; + restaurantCustomerAi.InitializeAi(_customerData); // 스킨 설정 _spineController.SetSkin(_customerData.SpineSkinKey); - - // CustomerType에 따른 behavior tree subtree 할당 - await InitializeBehaviorTree(); - } - - private async Task InitializeBehaviorTree() - { - var customerData = RestaurantData.Instance.CustomerData; - - if (customerData?.CustomerBehaviorData?.TryGetValue(_customerData.CustomerType, out var subtreeReference) != true) - { - Debug.LogError($"[CustomerCharacter] No behavior data found for CustomerType: {_customerData.CustomerType}"); - return; - } - - try - { - var subtree = await subtreeReference.LoadAssetAsync().Task; - if (subtree != null) - { - _behaviorTree.Subgraph = subtree; - _behaviorTree.StartBehavior(); - } - else - { - Debug.LogError($"[CustomerCharacter] Failed to load subtree for CustomerType: {_customerData.CustomerType}"); - } - } - catch (System.Exception e) - { - Debug.LogError($"[CustomerCharacter] Error loading subtree for CustomerType {_customerData.CustomerType}: {e.Message}"); - } } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcCharacter.cs index 1df86afe0..0b55d5293 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcCharacter.cs @@ -3,16 +3,12 @@ namespace DDD { - [RequireComponent(typeof(BehaviorTree))] + [RequireComponent(typeof(RestaurantNpcMovement))] public class RestaurantNpcCharacter : RestaurantCharacter { - protected BehaviorTree _behaviorTree; - protected override void Awake() { base.Awake(); - - _behaviorTree = GetComponent(); } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerCharacter.cs index ea20068fb..7dad4869f 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Player/RestaurantPlayerCharacter.cs @@ -1,5 +1,8 @@ +using UnityEngine; + namespace DDD { + [RequireComponent(typeof(RestaurantPlayerMovement))] public class RestaurantPlayerCharacter : RestaurantCharacter { protected override async void Awake() diff --git a/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/RestaurantRunController.cs b/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/RestaurantRunController.cs index 179f4a908..6bbc05bc3 100644 --- a/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/RestaurantRunController.cs +++ b/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/RestaurantRunController.cs @@ -27,6 +27,9 @@ public override Task InitializeController() { _restaurantCustomerStateSo = RestaurantState.Instance.CustomerState; _restaurantRunStateSo = RestaurantState.Instance.RunState; + + _iCustomerFactory ??= new CustomerFactory(); + return Task.CompletedTask; } @@ -41,6 +44,9 @@ public override async Task OnReadyNewFlow(GameFlowState newFlowState) { if (newFlowState == GameFlowState.RunRestaurant) { + _iCustomerFactory.LoadAssets(); + await _restaurantCustomerStateSo.LoadCustomerBehaviorData(); + _cts?.Cancel(); _cts?.Dispose(); _cts = new CancellationTokenSource(); @@ -52,6 +58,9 @@ public override Task OnExitCurrentFlow(GameFlowState exitingFlowState) { if (exitingFlowState == GameFlowState.RunRestaurant) { + _iCustomerFactory.UnloadAssets(); + _restaurantCustomerStateSo.UnloadCustomerBehaviorData(); + _cts?.Cancel(); _cts?.Dispose(); _cts = null; @@ -61,8 +70,6 @@ public override Task OnExitCurrentFlow(GameFlowState exitingFlowState) private async Task StartSpawnLoopAsync(CancellationToken token) { - _iCustomerFactory ??= new CustomerFactory(); - var currentGameLevel = GameState.Instance.LevelState.Level; _levelDataSo ??= DataManager.Instance.GetDataSo(); _customerDataSo ??= DataManager.Instance.GetDataSo(); @@ -115,7 +122,7 @@ SpawnSchedule MakeSchedule() => scheduleBuilder.Build(new SpawnScheduleBuildArgs { var rotation = Quaternion.identity; - _ = _iCustomerFactory.CreateAsync(new CustomerSpawnArgs + await _iCustomerFactory.CreateAsync(new CustomerSpawnArgs { CustomerData = customerData, Position = _restaurantRunStateSo.SpawnPoint, diff --git a/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/Run/Customer/CustomerFactory.cs b/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/Run/Customer/CustomerFactory.cs index d69b62862..9131469c6 100644 --- a/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/Run/Customer/CustomerFactory.cs +++ b/Assets/_DDD/_Scripts/RestaurantController/Conrtollers/Run/Customer/CustomerFactory.cs @@ -1,11 +1,15 @@ using System.Threading.Tasks; using UnityEngine; +using UnityEngine.AddressableAssets; +using UnityEngine.ResourceManagement.AsyncOperations; namespace DDD { public interface ICustomerFactory { Task CreateAsync(CustomerSpawnArgs args); + void LoadAssets(); + void UnloadAssets(); } public interface ICustomerInitializer @@ -24,26 +28,14 @@ public struct CustomerSpawnArgs public class CustomerFactory : ICustomerFactory { private GameObject _customerPrefab; + private AsyncOperationHandle _customerPrefabHandle; public async Task CreateAsync(CustomerSpawnArgs args) { if (!_customerPrefab) { - var customerDataAsset = RestaurantData.Instance ? RestaurantData.Instance.CustomerData : null; - if (customerDataAsset == null || customerDataAsset.CustomerPrefab == null) - { - Debug.LogError("[CustomerFactory] RestaurantCustomerData or its CustomerPrefab reference is not set or not loaded."); - return null; - } - - var handle = customerDataAsset.CustomerPrefab.LoadAssetAsync(); - await handle.Task; - if (handle.Result == null) - { - Debug.LogError("[CustomerFactory] Failed to load customer prefab from AssetReference."); - return null; - } - _customerPrefab = handle.Result; + Debug.LogError("[CustomerFactory] Customer prefab is not loaded. Call LoadAssets() first."); + await LoadCustomerAsset(); } var newCustomer = Object.Instantiate(_customerPrefab, args.Position, args.Rotation, args.Parent); @@ -54,5 +46,47 @@ public async Task CreateAsync(CustomerSpawnArgs args) } return newCustomer; } + + public async void LoadAssets() + { + await LoadCustomerAsset(); + } + + private async Task LoadCustomerAsset() + { + if (_customerPrefab != null) + { + return; + } + + var customerDataAsset = RestaurantData.Instance ? RestaurantData.Instance.CustomerData : null; + if (customerDataAsset == null || customerDataAsset.CustomerPrefab == null) + { + Debug.LogError("[CustomerFactory] RestaurantCustomerData or its CustomerPrefab reference is not set."); + return; + } + + _customerPrefabHandle = customerDataAsset.CustomerPrefab.LoadAssetAsync(); + await _customerPrefabHandle.Task; + + if (_customerPrefabHandle.Result == null) + { + Debug.LogError("[CustomerFactory] Failed to load customer prefab from AssetReference."); + return; + } + + _customerPrefab = _customerPrefabHandle.Result; + Debug.Log("[CustomerFactory] Customer prefab loaded successfully."); + } + + public void UnloadAssets() + { + if (_customerPrefabHandle.IsValid()) + { + Addressables.Release(_customerPrefabHandle); + } + _customerPrefab = null; + Debug.Log("[CustomerFactory] Customer prefab unloaded."); + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index b224eb969..26b80cdb9 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -10,6 +10,8 @@ public enum RestaurantOrderType : uint Reserved = 1u, Order = 1u << 1, Serve = 1u << 2, + Busy = 1u << 3, + Dirty = 1u << 4, } public class RestaurantOrderInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs index 7f4019448..e3857aa52 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs @@ -12,7 +12,9 @@ public static class RestaurantOrderSolvers { RestaurantOrderType.Wait, typeof(RestaurantOrderSolver_Wait) }, { RestaurantOrderType.Reserved, typeof(RestaurantOrderSolver_Reserved) }, { RestaurantOrderType.Order, typeof(RestaurantOrderSolver_Order) }, - { RestaurantOrderType.Serve, typeof(RestaurantOrderSolver_Serve) } + { RestaurantOrderType.Serve, typeof(RestaurantOrderSolver_Serve) }, + { RestaurantOrderType.Busy, typeof(RestaurantOrderSolver_Busy) }, + { RestaurantOrderType.Dirty, typeof(RestaurantOrderSolver_Dirty) } }; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs new file mode 100644 index 000000000..da7bad36a --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD.RestaurantOrders +{ + public class RestaurantOrderSolver_Busy : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + // TODO : DO SOMETHING!!! + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs.meta new file mode 100644 index 000000000..c51efc3cf --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c185b3957ffe47088703be10e709ff66 +timeCreated: 1755761370 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs new file mode 100644 index 000000000..571cbd9a0 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD.RestaurantOrders +{ + public class RestaurantOrderSolver_Dirty : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + // TODO : DO SOMETHING!!! + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs.meta new file mode 100644 index 000000000..07cdfe4f7 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b97bc6ce36df4e05a4d329f11daef43f +timeCreated: 1755761294 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantCustomerState.cs b/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantCustomerState.cs index 0c326a38b..b18f09bbe 100644 --- a/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantCustomerState.cs +++ b/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantCustomerState.cs @@ -1,9 +1,106 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Opsive.BehaviorDesigner.Runtime; using Sirenix.OdinInspector; using UnityEngine; +using UnityEngine.AddressableAssets; +using UnityEngine.ResourceManagement.AsyncOperations; namespace DDD { public class RestaurantCustomerState : ScriptableObject { + private Dictionary _loadedSubtrees = new Dictionary(); + private Dictionary> _subtreeHandles = new Dictionary>(); + + public async Task LoadCustomerBehaviorData() + { + var customerData = RestaurantData.Instance?.CustomerData; + if (customerData?.CustomerBehaviorData == null) + { + Debug.LogError("[RestaurantCustomerState] RestaurantCustomerData or CustomerBehaviorData is null"); + return; + } + + var loadTasks = new List(); + foreach (var behaviorPair in customerData.CustomerBehaviorData) + { + var customerType = behaviorPair.Key; + var subtreeReference = behaviorPair.Value; + + if (_loadedSubtrees.ContainsKey(customerType)) + continue; // Already loaded + + loadTasks.Add(LoadSubtreeAsync(customerType, subtreeReference)); + } + + await Task.WhenAll(loadTasks); + Debug.Log($"[RestaurantCustomerState] Loaded {_loadedSubtrees.Count} customer behavior subtrees"); + } + + private async Task LoadSubtreeAsync(CustomerType customerType, AssetReference subtreeReference) + { + var handle = Addressables.LoadAssetAsync(subtreeReference); + _subtreeHandles[customerType] = handle; + + await handle.Task; + + if (handle.Result != null) + { + _loadedSubtrees[customerType] = handle.Result; + Debug.Log($"[RestaurantCustomerState] Loaded subtree for {customerType}"); + } + else + { + Debug.LogError($"[RestaurantCustomerState] Failed to load subtree for {customerType}"); + } + } + + public void UnloadCustomerBehaviorData() + { + foreach (var handle in _subtreeHandles.Values) + { + if (handle.IsValid()) + { + Addressables.Release(handle); + } + } + + _loadedSubtrees.Clear(); + _subtreeHandles.Clear(); + Debug.Log("[RestaurantCustomerState] Unloaded all customer behavior subtrees"); + } + + public Subtree GetLoadedSubtree(CustomerType customerType) + { + _loadedSubtrees.TryGetValue(customerType, out var subtree); + return subtree; + } + + public async Task GetOrLoadSubtree(CustomerType customerType) + { + if (IsSubtreeLoaded(customerType)) + { + return GetLoadedSubtree(customerType); + } + else + { + var customerData = RestaurantData.Instance?.CustomerData; + if (customerData?.CustomerBehaviorData == null || + !customerData.CustomerBehaviorData.TryGetValue(customerType, out var subtreeReference)) + { + Debug.LogError($"[RestaurantCustomerState] No behavior data found for {customerType}"); + return null; + } + + await LoadSubtreeAsync(customerType, subtreeReference); + return GetLoadedSubtree(customerType); + } + } + + public bool IsSubtreeLoaded(CustomerType customerType) + { + return _loadedSubtrees.ContainsKey(customerType); + } } } \ No newline at end of file diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 6459f8e33..ed8485fa0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8ae76b7c8f92890e759f46ff36b5db6b9e756533c8f14d3ef3ea41df7f4c5ad +oid sha256:f86abe14bf9fc4c7c93dfa96efd110ef0f56c3fb96a952c57e06a723fc87c352 size 1075 From 4ef63ec9a9d9125196ec86469501aac9a5090c76 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Thu, 21 Aug 2025 19:12:06 +0900 Subject: [PATCH 02/12] =?UTF-8?q?AI=20=EB=B9=84=ED=97=A4=EC=9D=B4=EB=B9=84?= =?UTF-8?q?=EC=96=B4=20=ED=8A=B8=EB=A6=AC=20=EC=95=A1=EC=85=98=20=EB=B0=8F?= =?UTF-8?q?=20=EC=BB=A8=EB=94=94=EC=85=94=EB=84=90=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RestaurantOrderAvailable, StartRestaurantOrder, MoveToInteractionTarget --- .../AI/Customer/Subtree/CustomerDefault.asset | 4 +- Assets/_DDD/_Scripts/AI.meta | 3 + Assets/_DDD/_Scripts/AI/Common.meta | 3 + .../_Scripts/AI/Common/IAISharedBlackboard.cs | 15 ++ .../AI/Common/IAISharedBlackboard.cs.meta | 3 + .../RestaurantCharacter/AI/Common.meta | 3 + .../AI/Common/Actions.meta | 3 + .../Common/Actions/MoveToInteractionTarget.cs | 165 ++++++++++++++++++ .../Actions/MoveToInteractionTarget.cs.meta | 3 + .../RestaurantCharacter/AI/Customer.meta | 3 + .../AI/Customer/Actions.meta | 3 + .../Customer/Actions/StartRestaurantOrder.cs | 60 +++++++ .../Actions/StartRestaurantOrder.cs.meta | 3 + .../AI/Customer/Conditionals.meta | 3 + .../Conditionals/RestaurantOrderAvailable.cs | 73 ++++++++ .../RestaurantOrderAvailable.cs.meta | 3 + .../RestaurantCustomerAiComponent.cs | 0 .../RestaurantCustomerAiComponent.cs.meta | 0 .../RestaurantCustomerBlackboardComponent.cs | 39 +++++ ...taurantCustomerBlackboardComponent.cs.meta | 0 .../RestaurantCustomerBlackboardComponent.cs | 21 --- .../IRestaurantCustomerBlackboard.cs | 5 + .../RestaurantOrderInteractionSubsystem.cs | 23 ++- .../RestaurantInteractionComponent.cs | 19 +- .../FlowStates/RestaurantEnvironmentState.cs | 49 ++++++ 25 files changed, 476 insertions(+), 30 deletions(-) create mode 100644 Assets/_DDD/_Scripts/AI.meta create mode 100644 Assets/_DDD/_Scripts/AI/Common.meta create mode 100644 Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs create mode 100644 Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs.meta rename Assets/_DDD/_Scripts/RestaurantCharacter/AI/{ => Customer}/RestaurantCustomerAiComponent.cs (100%) rename Assets/_DDD/_Scripts/RestaurantCharacter/AI/{ => Customer}/RestaurantCustomerAiComponent.cs.meta (100%) create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerBlackboardComponent.cs rename Assets/_DDD/_Scripts/RestaurantCharacter/AI/{ => Customer}/RestaurantCustomerBlackboardComponent.cs.meta (100%) delete mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index fa318032c..5b6b58011 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:948390052ce3eddb7f00b5d0f3286b789c8298f4f327a7843304e44f8a2e6513 -size 87077 +oid sha256:103256172ac6f8b232d1029ec42596c1b546dccf332b0b877b643f77f13d9b42 +size 86840 diff --git a/Assets/_DDD/_Scripts/AI.meta b/Assets/_DDD/_Scripts/AI.meta new file mode 100644 index 000000000..488015a6b --- /dev/null +++ b/Assets/_DDD/_Scripts/AI.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c31792c3491f44878a9a5e8ee59504cf +timeCreated: 1755770768 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/AI/Common.meta b/Assets/_DDD/_Scripts/AI/Common.meta new file mode 100644 index 000000000..8b9f60e70 --- /dev/null +++ b/Assets/_DDD/_Scripts/AI/Common.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 49c654aa3aa94cb9928e2d161cad789a +timeCreated: 1755770768 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs b/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs new file mode 100644 index 000000000..154eebd47 --- /dev/null +++ b/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace DDD +{ + /// + /// 공용 AI 블랙보드 인터페이스. + /// - 다양한 캐릭터 AI에서 공통으로 참조하는 현재 인터랙션 타겟만 정의합니다. + /// - 필요 시 키-값 확장을 고려하되, 현재는 최소 요구만 충족합니다. + /// + public interface IAISharedBlackboard + { + void SetCurrentInteractionTarget(GameObject targetGameObject); + GameObject GetCurrentInteractionTarget(); + } +} diff --git a/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs.meta b/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs.meta new file mode 100644 index 000000000..271230278 --- /dev/null +++ b/Assets/_DDD/_Scripts/AI/Common/IAISharedBlackboard.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 62510fba6cb047419ca463dc523ae536 +timeCreated: 1755770768 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common.meta new file mode 100644 index 000000000..52bf270e4 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cfc8e456b2134c4a87b9fcd0d385cf1d +timeCreated: 1755767029 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions.meta new file mode 100644 index 000000000..b497afe8e --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ab824a41c52d4cca8cafb1fc96d5d8e7 +timeCreated: 1755769401 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs new file mode 100644 index 000000000..953f6a5d4 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs @@ -0,0 +1,165 @@ +using System; +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD +{ + /// + /// IAiMovement를 이용해 인터랙션 타겟(주로 RestaurantInteractionComponent가 붙은 오브젝트)으로 이동하는 액션. + /// - 타겟은 우선 블랙보드(IRestaurantCustomerBlackboard)에서 가져오고, 없으면 Interactor의 FocusedInteractable에서 가져옵니다. + /// - 타겟에 RestaurantInteractionComponent가 있다면 가장 가까운 InteractionPoint를 목적지로 사용합니다. + /// + public class MoveToInteractionTarget : Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Action + { + [Header("Target")] + [Tooltip("타겟에 RestaurantInteractionComponent가 있을 때 InteractionPoints를 사용해 가장 가까운 지점으로 이동합니다.")] + [SerializeField] private bool _useInteractionPoints = true; + [Tooltip("타겟이 없을 때 즉시 실패할지 여부")] + [SerializeField] private bool _failIfNoTarget = true; + + [Header("Movement")] + [Tooltip("목적지에 도달했다고 간주할 거리")] + [SerializeField] private float _stoppingDistance = 0.5f; + [Tooltip("이동 중 목적지를 재계산하는 주기(초). 0 이하면 재계산하지 않음")] + [SerializeField] private float _repathInterval = 0.5f; + + private IAiMovement _movement; + private float _repathTimer; + private Vector3 _currentDestination; + private bool _started; + private GameObject _resolvedTarget; + + public override void OnStart() + { + _movement = gameObject.GetComponentInParent(); + _repathTimer = 0f; + _started = false; + _resolvedTarget = ResolveTargetFromContext(); + } + + public override TaskStatus OnUpdate() + { + if (_movement == null) + { + return TaskStatus.Failure; + } + + // 매 프레임 타겟이 갱신될 수 있으므로 재해결 (필요 시 비용 줄일 수 있음) + _resolvedTarget = _resolvedTarget ?? ResolveTargetFromContext(); + + if (_resolvedTarget == null) + { + if (_failIfNoTarget) return TaskStatus.Failure; + return TaskStatus.Success; + } + + // 타겟이 파괴되었는지 확인 + if (_resolvedTarget == null || (_resolvedTarget as UnityEngine.Object) == null) + { + return TaskStatus.Failure; + } + + // 목적지 계산 및 이동 시작/유지 + _repathTimer -= Time.deltaTime; + if (!_started || _repathInterval > 0f && _repathTimer <= 0f) + { + _currentDestination = GetBestDestination(_resolvedTarget); + _repathTimer = _repathInterval; + + if (!_started) + { + if (!_movement.TryMoveToPosition(_currentDestination)) + { + return TaskStatus.Failure; + } + _movement.EnableMove(); + _movement.PlayMove(); + _started = true; + } + else + { + // 이동 중 목적지 갱신 시도 + _movement.TryMoveToPosition(_currentDestination); + } + } + + // 도달 판정 + var sqrDist = (GetAgentPosition() - _currentDestination).sqrMagnitude; + if (sqrDist <= _stoppingDistance * _stoppingDistance || _movement.HasReachedDestination()) + { + _movement.StopMove(); + _movement.DisableMove(); + return TaskStatus.Success; + } + + return TaskStatus.Running; + } + + public override void OnEnd() + { + // 액션 종료 시 이동 중지(안전장치) + if (_movement != null) + { + _movement.StopMove(); + _movement.DisableMove(); + } + _resolvedTarget = null; + } + + private GameObject ResolveTargetFromContext() + { + // 1) 공용 블랙보드에서 가져오기 + var sharedBlackboard = gameObject.GetComponentInParent(); + var bbTarget = sharedBlackboard?.GetCurrentInteractionTarget(); + if (bbTarget != null) return bbTarget; + + // 2) Interactor의 포커싱 대상에서 가져오기 + var interactor = gameObject.GetComponentInParent(); + var focused = interactor?.GetFocusedInteractable(); + if (focused != null) + { + return focused.GetInteractableGameObject(); + } + + return null; + } + + private Vector3 GetAgentPosition() + { + return _movement != null ? _movement.CurrentPosition : transform.position; + } + + private Vector3 GetBestDestination(GameObject target) + { + if (!_useInteractionPoints) + { + return target.transform.position; + } + + if (target.TryGetComponent(out var ric)) + { + var points = ric.GetInteractionPoints(); + if (points != null && points.Length > 0) + { + var from = GetAgentPosition(); + float bestSqr = float.MaxValue; + Vector3 best = target.transform.position; + for (int i = 0; i < points.Length; i++) + { + var p = points[i]; + var sqr = (p - from).sqrMagnitude; + if (sqr < bestSqr) + { + bestSqr = sqr; + best = p; + } + } + return best; + } + } + + return target.transform.position; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs.meta new file mode 100644 index 000000000..92e078ee6 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d97cd08353334cb698807d4b526d01b6 +timeCreated: 1755769413 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer.meta new file mode 100644 index 000000000..20e141632 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6f1cc55df1da4604a2a7f445527710de +timeCreated: 1755765247 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions.meta new file mode 100644 index 000000000..471d824db --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6777cf4d7cf4408fafe4bc9097c32b01 +timeCreated: 1755767888 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs new file mode 100644 index 000000000..004f9111b --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs @@ -0,0 +1,60 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD +{ + public class StartRestaurantOrder : Action + { + [Tooltip("상호작용할 RestaurantOrderType")] + [SerializeField] private RestaurantOrderType _targetOrderType = RestaurantOrderType.Wait; + [Tooltip("실제 상호작용 가능 여부를 확인하고 수행합니다")] + [SerializeField] private bool _requireCanInteract = true; + [Tooltip("성공 시 블랙보드에 현재 인터랙션 대상을 등록합니다")] + [SerializeField] private bool _registerOnBlackboard = true; + + public override TaskStatus OnUpdate() + { + // TODO : 아래 타겟 찾기가 RestaurantOrderAvailable과 동일해야 함, 동일하면 중복될 필요 없으니 스태틱 유틸 함수정도로 만들어서 공유하기. + // 레스토랑 주문 인터랙션 후보를 가져옴 + TaskStatus targetSearchSuccess = RestaurantOrderAvailable.FindAvailableOrderInteractable(_requireCanInteract, _targetOrderType, out var + outInteractable); + if (targetSearchSuccess == TaskStatus.Failure) + { + return TaskStatus.Failure; + } + + // TODO : 아래 상호작용 수행 로직이 우리 프로젝트의 권장하는 방식이 아님. 플레이어가 오브젝트에 인터랙션하는 것과 비슷한 흐름으로 NPC가 오브젝트에 인터랙션하게 만들 것. + // 상호작용 수행: 액션이 붙은 에이전트를 Interactor로 사용 + var interactor = gameObject.GetComponentInParent(); + if (interactor == null) + { + return TaskStatus.Failure; + } + + var interacted = outInteractable.OnInteracted(interactor); + if (!interacted) + { + return TaskStatus.Failure; + } + + if (_registerOnBlackboard) + { + // 공용 블랙보드 우선 + var shared = gameObject.GetComponentInParent(); + if (shared != null) + { + shared.SetCurrentInteractionTarget(outInteractable.gameObject); + } + else + { + // 하위 호환: 고객 전용 블랙보드 지원 + var customerBb = gameObject.GetComponentInParent(); + customerBb?.SetCurrentInteractionTarget(outInteractable.gameObject); + } + } + + return TaskStatus.Success; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs.meta new file mode 100644 index 000000000..b24f479a5 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 84b6c26acd1e41afa6b07ed4c6caf860 +timeCreated: 1755767930 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals.meta new file mode 100644 index 000000000..0df5af835 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c4f20081a3974c08b60b9efdbe1568a7 +timeCreated: 1755765256 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs new file mode 100644 index 000000000..d6f49b45d --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs @@ -0,0 +1,73 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Conditionals; +using UnityEngine; +using DDD; + +namespace DDD +{ + public class RestaurantOrderAvailable : Conditional + { + [Tooltip("검사할 RestaurantOrderType")] + [SerializeField] private RestaurantOrderType _targetOrderType = RestaurantOrderType.Wait; + [Tooltip("인터랙션 가능 여부까지 확인할지 선택")] + [SerializeField] private bool _checkCanInteract = true; + + public RestaurantOrderType TargetOrderType + { + get => _targetOrderType; + set => _targetOrderType = value; + } + + public bool CheckCanInteract + { + get => _checkCanInteract; + set => _checkCanInteract = value; + } + + public override TaskStatus OnUpdate() + { + TaskStatus targetSearchSuccess = FindAvailableOrderInteractable(_checkCanInteract, _targetOrderType, out var + outInteractable); + return targetSearchSuccess; + + } + + public static TaskStatus FindAvailableOrderInteractable(bool checkCanInteract, RestaurantOrderType targetOrderType, out RestaurantInteractionComponent outInteractable) + { + outInteractable = null; + + var environmentState = RestaurantState.Instance?.EnvironmentState; + if (environmentState == null) + { + return TaskStatus.Failure; + } + + var interactables = environmentState.GetInteractablesByType(InteractionType.RestaurantOrder); + + foreach (var interactable in interactables) + { + // 서브시스템에서 RestaurantOrderType을 가져와 비교 + outInteractable = interactable as RestaurantInteractionComponent; + if (outInteractable == null) continue; + if (!outInteractable.TryGetSubsystemObject(out var subsystem)) continue; + + if (subsystem.GetInteractionSubsystemType() == targetOrderType) + { + // CheckCanInteract이 false면 타입만 맞으면 성공 + if (!checkCanInteract) + { + return TaskStatus.Success; + } + + // CheckCanInteract이 true면 실제 인터랙션 가능 여부까지 확인 + if (interactable.CanInteract()) + { + return TaskStatus.Success; + } + } + } + + return TaskStatus.Failure; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs.meta new file mode 100644 index 000000000..04186450b --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bef354fd7cae4273b4cb4e7ff9e270f5 +timeCreated: 1755765519 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerAiComponent.cs similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs rename to Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerAiComponent.cs diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerAiComponent.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerAiComponent.cs.meta rename to Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerAiComponent.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerBlackboardComponent.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerBlackboardComponent.cs new file mode 100644 index 000000000..98112000e --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerBlackboardComponent.cs @@ -0,0 +1,39 @@ +using Opsive.BehaviorDesigner.Runtime; +using UnityEngine; + +namespace DDD +{ + public class RestaurantCustomerBlackboardComponent : MonoBehaviour, IRestaurantCustomerBlackboard, IAISharedBlackboard + { + private Subtree _subtree; + private GameObject _currentInteractionTarget; + + public void InitializeWithBehaviorTree(Subtree subtree) + { + _subtree = subtree; + if (_subtree != null) + { + _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.SelfGameObject), gameObject); + } + } + + public void SetCustomerData(CustomerData inCustomerData) + { + if (_subtree == null) return; + _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.CustomerData), inCustomerData); + } + + public void SetCurrentInteractionTarget(GameObject targetGameObject) + { + _currentInteractionTarget = targetGameObject; + if (_subtree == null) return; + _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.CurrentInteractionTarget), targetGameObject); + } + + public GameObject GetCurrentInteractionTarget() + { + // 캐시 우선 반환. 필요 시 Subtree에서 직접 조회하도록 확장 가능. + return _currentInteractionTarget; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerBlackboardComponent.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs.meta rename to Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/RestaurantCustomerBlackboardComponent.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs deleted file mode 100644 index f042b9227..000000000 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/RestaurantCustomerBlackboardComponent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Opsive.BehaviorDesigner.Runtime; -using UnityEngine; - -namespace DDD -{ - public class RestaurantCustomerBlackboardComponent : MonoBehaviour, IRestaurantCustomerBlackboard - { - private Subtree _subtree; - - public void InitializeWithBehaviorTree(Subtree subtree) - { - _subtree = subtree; - _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.SelfGameObject), gameObject); - } - - public void SetCustomerData(CustomerData inCustomerData) - { - _subtree.SetVariableValue(nameof(RestaurantCustomerBlackboardKey.CustomerData), inCustomerData);; - } - } -} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs index bc261391b..51859cddf 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Interfaces/IRestaurantCustomerBlackboard.cs @@ -1,13 +1,18 @@ +using UnityEngine; + namespace DDD { public enum RestaurantCustomerBlackboardKey { SelfGameObject, CustomerData, + CurrentInteractionTarget, } public interface IRestaurantCustomerBlackboard { void SetCustomerData(CustomerData inCustomerData); + void SetCurrentInteractionTarget(GameObject targetGameObject); + GameObject GetCurrentInteractionTarget(); } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index 26b80cdb9..90bca043f 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -3,7 +3,6 @@ namespace DDD { - [Flags] public enum RestaurantOrderType : uint { Wait = 0u, @@ -35,11 +34,9 @@ public bool CanInteract() public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) { - if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) - { - // DO WAIT CUSTOMER - } - + // 간단한 상태 전이: 현재 상태에서 다음 상태로 이동 + var prev = currentRestaurantOrderType; + currentRestaurantOrderType = GetNextState(prev); return true; } @@ -52,5 +49,19 @@ public RestaurantOrderType GetInteractionSubsystemType() { return currentRestaurantOrderType; } + + private RestaurantOrderType GetNextState(RestaurantOrderType state) + { + switch (state) + { + case RestaurantOrderType.Wait: return RestaurantOrderType.Reserved; + case RestaurantOrderType.Reserved: return RestaurantOrderType.Order; + case RestaurantOrderType.Order: return RestaurantOrderType.Serve; + case RestaurantOrderType.Serve: return RestaurantOrderType.Busy; + case RestaurantOrderType.Busy: return RestaurantOrderType.Dirty; + case RestaurantOrderType.Dirty: return RestaurantOrderType.Wait; + default: return RestaurantOrderType.Wait; + } + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 2cf9c4102..7921054b4 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -30,14 +30,31 @@ public class RestaurantInteractionComponent : MonoBehaviour, IInteractable, IInt private Dictionary _subsystems = new(); - private void Start() + private void OnEnable() { + // Register this interactable to environment state + var environmentState = RestaurantState.Instance?.EnvironmentState; + environmentState?.RegisterInteractable(this); + if (autoInitialize) { InitializeInteraction(_interactionType); } } + private void OnDisable() + { + var environmentState = RestaurantState.Instance?.EnvironmentState; + environmentState?.UnregisterInteractable(this); + } + + private void Start() + { + // 보수적으로 Start에서도 등록 시도 (OnEnable 시점에 EnvironmentState가 없었을 경우 대비) + var environmentState = RestaurantState.Instance?.EnvironmentState; + environmentState?.RegisterInteractable(this); + } + private static IEnumerable GetAllInteractionTypes() { return System.Enum.GetValues(typeof(InteractionType)) diff --git a/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantEnvironmentState.cs b/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantEnvironmentState.cs index 75313179a..afb94720d 100644 --- a/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantEnvironmentState.cs +++ b/Assets/_DDD/_Scripts/RestaurantState/FlowStates/RestaurantEnvironmentState.cs @@ -21,5 +21,54 @@ public class RestaurantEnvironmentState : ScriptableObject { public List Props = new List(); public List Objects = new List(); + + // 인터랙션 가능한 객체(IInteractable)를 관리하기 위한 리스트 (런타임 전용) + private readonly List _registeredInteractables = new List(); + + /// + /// 인터랙션 가능한 객체를 등록합니다 + /// + public void RegisterInteractable(IInteractable interactable) + { + if (interactable == null) return; + if (_registeredInteractables.Contains(interactable)) return; + _registeredInteractables.Add(interactable); + } + + /// + /// 인터랙션 가능한 객체를 해제합니다 + /// + public void UnregisterInteractable(IInteractable interactable) + { + if (interactable == null) return; + _registeredInteractables.Remove(interactable); + } + + /// + /// 특정 InteractionType에 해당하는 인터랙션 객체들을 반환합니다 + /// + public List GetInteractablesByType(InteractionType interactionType) + { + var result = new List(); + // null 또는 Destroyed 오브젝트 정리 + _registeredInteractables.RemoveAll(item => item == null || (item as UnityEngine.Object) == null); + foreach (var interactable in _registeredInteractables) + { + if (interactable.GetInteractionType() == interactionType) + { + result.Add(interactable); + } + } + return result; + } + + /// + /// 모든 등록된 인터랙션 객체들을 반환합니다 + /// + public List GetAllInteractables() + { + _registeredInteractables.RemoveAll(item => item == null || (item as UnityEngine.Object) == null); + return new List(_registeredInteractables); + } } } \ No newline at end of file From 71fbd60719ee9d3c27ba66ad166a9d36ab604257 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Thu, 21 Aug 2025 19:13:39 +0900 Subject: [PATCH 03/12] Refactored MoveToInteractionTarget --- .../Common/Actions/MoveToInteractionTarget.cs | 252 +++++++++--------- 1 file changed, 129 insertions(+), 123 deletions(-) diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs index 953f6a5d4..b43e70e98 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs @@ -1,4 +1,3 @@ -using System; using Opsive.BehaviorDesigner.Runtime.Tasks; using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; using UnityEngine; @@ -6,160 +5,167 @@ namespace DDD { /// - /// IAiMovement를 이용해 인터랙션 타겟(주로 RestaurantInteractionComponent가 붙은 오브젝트)으로 이동하는 액션. - /// - 타겟은 우선 블랙보드(IRestaurantCustomerBlackboard)에서 가져오고, 없으면 Interactor의 FocusedInteractable에서 가져옵니다. - /// - 타겟에 RestaurantInteractionComponent가 있다면 가장 가까운 InteractionPoint를 목적지로 사용합니다. + /// IAiMovement를 이용해 인터랙션 타겟으로 이동하는 액션 /// - public class MoveToInteractionTarget : Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Action + public class MoveToInteractionTarget : Action { - [Header("Target")] - [Tooltip("타겟에 RestaurantInteractionComponent가 있을 때 InteractionPoints를 사용해 가장 가까운 지점으로 이동합니다.")] - [SerializeField] private bool _useInteractionPoints = true; + [Header("Target Settings")] + [Tooltip("InteractionPoints를 사용해 가장 가까운 지점으로 이동")] + [SerializeField] private bool useInteractionPoints = true; [Tooltip("타겟이 없을 때 즉시 실패할지 여부")] - [SerializeField] private bool _failIfNoTarget = true; + [SerializeField] private bool failIfNoTarget = true; - [Header("Movement")] - [Tooltip("목적지에 도달했다고 간주할 거리")] - [SerializeField] private float _stoppingDistance = 0.5f; - [Tooltip("이동 중 목적지를 재계산하는 주기(초). 0 이하면 재계산하지 않음")] - [SerializeField] private float _repathInterval = 0.5f; + [Header("Movement Settings")] + [Tooltip("목적지 도달 거리")] + [SerializeField] private float stoppingDistance = 0.5f; + [Tooltip("목적지 재계산 주기(초), 0 이하면 비활성화")] + [SerializeField] private float repathInterval = 0.5f; - private IAiMovement _movement; - private float _repathTimer; - private Vector3 _currentDestination; - private bool _started; - private GameObject _resolvedTarget; + private IAiMovement movement; + private float repathTimer; + private Vector3 currentDestination; + private bool isMoving; + private GameObject cachedTarget; public override void OnStart() { - _movement = gameObject.GetComponentInParent(); - _repathTimer = 0f; - _started = false; - _resolvedTarget = ResolveTargetFromContext(); + movement = gameObject.GetComponentInParent(); + repathTimer = 0f; + isMoving = false; + cachedTarget = null; } public override TaskStatus OnUpdate() { - if (_movement == null) - { + if (movement == null) return TaskStatus.Failure; + + var target = GetTarget(); + if (target == null) + return failIfNoTarget ? TaskStatus.Failure : TaskStatus.Success; + + if (ShouldUpdateDestination()) + { + currentDestination = CalculateDestination(target); + StartOrUpdateMovement(); } - // 매 프레임 타겟이 갱신될 수 있으므로 재해결 (필요 시 비용 줄일 수 있음) - _resolvedTarget = _resolvedTarget ?? ResolveTargetFromContext(); + return CheckMovementCompletion(); + } - if (_resolvedTarget == null) + public override void OnEnd() + { + StopMovement(); + cachedTarget = null; + } + + private GameObject GetTarget() + { + // 캐시된 타겟이 유효하면 재사용 + if (IsValidTarget(cachedTarget)) + return cachedTarget; + + // 블랙보드에서 타겟 검색 + cachedTarget = gameObject.GetComponentInParent() + ?.GetCurrentInteractionTarget(); + + if (IsValidTarget(cachedTarget)) + return cachedTarget; + + // Interactor의 포커스된 타겟 검색 + var interactor = gameObject.GetComponentInParent(); + var focusedInteractable = interactor?.GetFocusedInteractable(); + cachedTarget = focusedInteractable?.GetInteractableGameObject(); + + return cachedTarget; + } + + private bool IsValidTarget(GameObject target) => + target != null && target; + + private bool ShouldUpdateDestination() + { + repathTimer -= Time.deltaTime; + return !isMoving || (repathInterval > 0f && repathTimer <= 0f); + } + + private Vector3 CalculateDestination(GameObject target) + { + repathTimer = repathInterval; + + if (!useInteractionPoints) + return target.transform.position; + + return target.TryGetComponent(out var ric) + ? GetNearestInteractionPoint(ric) + : target.transform.position; + } + + private Vector3 GetNearestInteractionPoint(RestaurantInteractionComponent ric) + { + var points = ric.GetInteractionPoints(); + if (points == null || points.Length == 0) + return ric.transform.position; + + var agentPosition = GetAgentPosition(); + var nearestPoint = ric.transform.position; + var minDistanceSqr = float.MaxValue; + + foreach (var point in points) { - if (_failIfNoTarget) return TaskStatus.Failure; - return TaskStatus.Success; - } - - // 타겟이 파괴되었는지 확인 - if (_resolvedTarget == null || (_resolvedTarget as UnityEngine.Object) == null) - { - return TaskStatus.Failure; - } - - // 목적지 계산 및 이동 시작/유지 - _repathTimer -= Time.deltaTime; - if (!_started || _repathInterval > 0f && _repathTimer <= 0f) - { - _currentDestination = GetBestDestination(_resolvedTarget); - _repathTimer = _repathInterval; - - if (!_started) + var distanceSqr = (point - agentPosition).sqrMagnitude; + if (distanceSqr < minDistanceSqr) { - if (!_movement.TryMoveToPosition(_currentDestination)) - { - return TaskStatus.Failure; - } - _movement.EnableMove(); - _movement.PlayMove(); - _started = true; - } - else - { - // 이동 중 목적지 갱신 시도 - _movement.TryMoveToPosition(_currentDestination); + minDistanceSqr = distanceSqr; + nearestPoint = point; } } - // 도달 판정 - var sqrDist = (GetAgentPosition() - _currentDestination).sqrMagnitude; - if (sqrDist <= _stoppingDistance * _stoppingDistance || _movement.HasReachedDestination()) + return nearestPoint; + } + + private void StartOrUpdateMovement() + { + if (!isMoving) { - _movement.StopMove(); - _movement.DisableMove(); + if (movement.TryMoveToPosition(currentDestination)) + { + movement.EnableMove(); + movement.PlayMove(); + isMoving = true; + } + } + else + { + movement.TryMoveToPosition(currentDestination); + } + } + + private TaskStatus CheckMovementCompletion() + { + var distanceSqr = (GetAgentPosition() - currentDestination).sqrMagnitude; + var stoppingDistanceSqr = stoppingDistance * stoppingDistance; + + if (distanceSqr <= stoppingDistanceSqr || movement.HasReachedDestination()) + { + StopMovement(); return TaskStatus.Success; } return TaskStatus.Running; } - public override void OnEnd() + private void StopMovement() { - // 액션 종료 시 이동 중지(안전장치) - if (_movement != null) + if (movement != null && isMoving) { - _movement.StopMove(); - _movement.DisableMove(); + movement.StopMove(); + movement.DisableMove(); + isMoving = false; } - _resolvedTarget = null; } - private GameObject ResolveTargetFromContext() - { - // 1) 공용 블랙보드에서 가져오기 - var sharedBlackboard = gameObject.GetComponentInParent(); - var bbTarget = sharedBlackboard?.GetCurrentInteractionTarget(); - if (bbTarget != null) return bbTarget; - - // 2) Interactor의 포커싱 대상에서 가져오기 - var interactor = gameObject.GetComponentInParent(); - var focused = interactor?.GetFocusedInteractable(); - if (focused != null) - { - return focused.GetInteractableGameObject(); - } - - return null; - } - - private Vector3 GetAgentPosition() - { - return _movement != null ? _movement.CurrentPosition : transform.position; - } - - private Vector3 GetBestDestination(GameObject target) - { - if (!_useInteractionPoints) - { - return target.transform.position; - } - - if (target.TryGetComponent(out var ric)) - { - var points = ric.GetInteractionPoints(); - if (points != null && points.Length > 0) - { - var from = GetAgentPosition(); - float bestSqr = float.MaxValue; - Vector3 best = target.transform.position; - for (int i = 0; i < points.Length; i++) - { - var p = points[i]; - var sqr = (p - from).sqrMagnitude; - if (sqr < bestSqr) - { - bestSqr = sqr; - best = p; - } - } - return best; - } - } - - return target.transform.position; - } + private Vector3 GetAgentPosition() => + movement?.CurrentPosition ?? transform.position; } } \ No newline at end of file From f8122d8c7002fb247f89dba33c0444baaf6a521f Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Thu, 21 Aug 2025 19:19:20 +0900 Subject: [PATCH 04/12] =?UTF-8?q?AI=20=EC=95=A1=EC=85=98=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC:=20LookAtInteractionTarget=20=EA=BB=8D=EB=8D=B0?= =?UTF-8?q?=EA=B8=B0/=EA=B3=A8=EA=B2=A9=20=EC=B6=94=EA=B0=80=20=EB=B0=8F?= =?UTF-8?q?=20MoveToInteractionTarget=20=EA=B2=BD=EB=A1=9C=20=EC=9E=AC?= =?UTF-8?q?=EA=B3=84=EC=82=B0/=EC=A0=95=EC=A7=80=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=95=88=EC=A0=95=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/Actions/LookAtInteractionTarget.cs | 140 ++++++++++++++++++ .../Actions/LookAtInteractionTarget.cs.meta | 3 + .../Common/Actions/MoveToInteractionTarget.cs | 2 +- 3 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs new file mode 100644 index 000000000..8abdaabe7 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs @@ -0,0 +1,140 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD +{ + /// + /// 인터랙션 타겟을 바라보도록 시각(Spine/애니메이션) 컴포넌트에 위임하는 액션의 껍데기/골격. + /// 실제 회전/스파인 제어 로직은 별도의 Visual 컴포넌트(예: Spine/Animation Controller)에서 구현하십시오. + /// + public class LookAtInteractionTarget : Action + { + [Header("Target Settings")] + [Tooltip("InteractionPoints를 사용해 가장 적절한 지점을 바라봄")] + [SerializeField] private bool useInteractionPoints = true; + [Tooltip("타겟이 없을 때 즉시 실패할지 여부")] + [SerializeField] private bool failIfNoTarget = true; + + [Header("Update Settings")] + [Tooltip("프레임마다 갱신하여 지속적으로 바라볼지 (Running 반환) 여부. 비활성화 시 1회만 시도하고 성공 처리")] + [SerializeField] private bool continuousUpdate = true; + + // Visual 전용 컴포넌트(나중 구현)를 위한 최소 인터페이스 + // 실제 구현은 Spine/애니메이션 제어 컴포넌트에서 이 인터페이스를 구현하세요. + public interface ILookAtVisual + { + // 초기 시작 시도. 성공 여부를 반환할 수 있으나, 본 액션은 성공/실패에 민감하지 않습니다. + bool TryBeginLookAt(Vector3 worldPosition); + // 매 프레임 갱신 시 호출됩니다. + void UpdateLookAt(Vector3 worldPosition); + // 액션 종료 시 호출됩니다. + void EndLookAt(); + } + + private ILookAtVisual visual; + private GameObject cachedTarget; + private bool isLooking; + private Vector3 currentLookPosition; + + public override void OnStart() + { + visual = gameObject.GetComponentInParent(); + cachedTarget = null; + isLooking = false; + } + + public override TaskStatus OnUpdate() + { + var target = GetTarget(); + if (target == null) + { + if (isLooking) + { + // 타겟이 사라졌다면 정리 + visual?.EndLookAt(); + isLooking = false; + } + return failIfNoTarget ? TaskStatus.Failure : TaskStatus.Success; + } + + currentLookPosition = CalculateLookPosition(target); + + if (!isLooking) + { + visual?.TryBeginLookAt(currentLookPosition); + isLooking = true; + } + else + { + visual?.UpdateLookAt(currentLookPosition); + } + + // 연속 업데이트면 Running, 아니면 1회만 시도 후 Success 반환 + return continuousUpdate ? TaskStatus.Running : TaskStatus.Success; + } + + public override void OnEnd() + { + if (isLooking) + { + visual?.EndLookAt(); + isLooking = false; + } + cachedTarget = null; + } + + private GameObject GetTarget() + { + // 캐시된 타겟이 유효하면 재사용 + if (IsValidTarget(cachedTarget)) + return cachedTarget; + + // 블랙보드에서 타겟 검색 + cachedTarget = gameObject.GetComponentInParent() + ?.GetCurrentInteractionTarget(); + + if (IsValidTarget(cachedTarget)) + return cachedTarget; + + // Interactor의 포커스된 타겟 검색 + var interactor = gameObject.GetComponentInParent(); + var focusedInteractable = interactor?.GetFocusedInteractable(); + cachedTarget = focusedInteractable?.GetInteractableGameObject(); + + return cachedTarget; + } + + private static bool IsValidTarget(GameObject target) => target != null && target; + + private Vector3 CalculateLookPosition(GameObject target) + { + if (!useInteractionPoints) + return target.transform.position; + + if (target.TryGetComponent(out var ric)) + { + var points = ric.GetInteractionPoints(); + if (points == null || points.Length == 0) + return target.transform.position; + + // 가장 가까운 상호작용 지점 선택 (MoveTo와 동일한 기준) + var agentPos = transform.position; + var nearest = target.transform.position; + var minSqr = float.MaxValue; + foreach (var p in points) + { + var d = (p - agentPos).sqrMagnitude; + if (d < minSqr) + { + minSqr = d; + nearest = p; + } + } + return nearest; + } + + return target.transform.position; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs.meta new file mode 100644 index 000000000..0f840f1cf --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/LookAtInteractionTarget.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a973b52fbfe64f8981b2a1d33864d2eb +timeCreated: 1755771294 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs index b43e70e98..192081afc 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs @@ -17,7 +17,7 @@ public class MoveToInteractionTarget : Action [Header("Movement Settings")] [Tooltip("목적지 도달 거리")] - [SerializeField] private float stoppingDistance = 0.5f; + [SerializeField] private float stoppingDistance = 0.01f; [Tooltip("목적지 재계산 주기(초), 0 이하면 비활성화")] [SerializeField] private float repathInterval = 0.5f; From a8ff9a1707d849009a60f3e752359294675b85d5 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Thu, 21 Aug 2025 19:21:26 +0900 Subject: [PATCH 05/12] Updated subtree --- .../_Addressables/AI/Customer/Subtree/CustomerDefault.asset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index 5b6b58011..5000879f7 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:103256172ac6f8b232d1029ec42596c1b546dccf332b0b877b643f77f13d9b42 -size 86840 +oid sha256:aaa2da8aae1c44d5897aa9ce88e57f59ec0f818b204cb20e44bbc6b34eeb11cd +size 86983 From 22047aeb8b5e1f3758864aa92df7459c436351b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Wed, 20 Aug 2025 15:30:08 +0900 Subject: [PATCH 06/12] =?UTF-8?q?=EC=9D=B8=ED=84=B0=EB=9E=99=EC=85=98=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EB=A1=9C=EC=A7=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B0=8F=20CustomerNpc=20=ED=94=84=EB=A6=AC?= =?UTF-8?q?=ED=8C=B9=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/RestaurantOrder.prefab | 3 +- .../_Addressables/Prefabs/CustomerNpc.prefab | 34 +++++++++++++++++++ .../Customer/Actions/StartRestaurantOrder.cs | 4 +-- .../Core/RestaurantCharacter.cs | 9 ++--- .../RestaurantInteractionComponent.cs | 9 ++++- .../Solvers/RestaurantSubsystemSolver.cs | 2 +- 6 files changed, 52 insertions(+), 9 deletions(-) diff --git a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab index 24036b0a6..546d96553 100644 --- a/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab +++ b/Assets/_DDD/Restaurant/Environments/Interactables/Common/RestaurantOrder.prefab @@ -133,7 +133,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} m_Name: m_EditorClassIdentifier: - _interactionType: 4 + _interactionType: 2 _executionParameters: _holdTime: 0 _displayParameters: @@ -141,6 +141,7 @@ MonoBehaviour: _interactionAvailableFlows: 2 _aiInteractionPoints: - {fileID: 1664322405549350652} + autoInitialize: 1 --- !u!114 &4456475204957017828 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index 4091378b7..e8667b395 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -1100,6 +1100,10 @@ PrefabInstance: propertyPath: skeletonDataAsset value: objectReference: {fileID: 11400000, guid: 90ef4d2128c770b4cb83806c33867a79, type: 2} + - target: {fileID: 5108021082109611361, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: _availableInteractions + value: 2 + objectReference: {fileID: 0} - target: {fileID: 6336425934484470474, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Materials.Array.size value: 4 @@ -1148,6 +1152,12 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} insertIndex: -1 addedObject: {fileID: 6054843938321605399} + - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + insertIndex: -1 + addedObject: {fileID: 3924055170972325225} + - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + insertIndex: -1 + addedObject: {fileID: 3825874317044733320} m_SourcePrefab: {fileID: 100100000, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} --- !u!1 &4266090516809920735 stripped GameObject: @@ -1166,3 +1176,27 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b242c4f65b2734841840c89dfab1500b, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &3924055170972325225 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266090516809920735} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 784c770c13244dc0a0804056065eaf92, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &3825874317044733320 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266090516809920735} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: af69e82818254bfa9cabb2dbf9430850, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs index 004f9111b..336001e00 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs @@ -26,8 +26,8 @@ public override TaskStatus OnUpdate() // TODO : 아래 상호작용 수행 로직이 우리 프로젝트의 권장하는 방식이 아님. 플레이어가 오브젝트에 인터랙션하는 것과 비슷한 흐름으로 NPC가 오브젝트에 인터랙션하게 만들 것. // 상호작용 수행: 액션이 붙은 에이전트를 Interactor로 사용 - var interactor = gameObject.GetComponentInParent(); - if (interactor == null) + var isGetInteractor = gameObject.TryGetComponent(out var interactor); + if (!isGetInteractor || !interactor.CanInteractTo(outInteractable)) { return TaskStatus.Failure; } diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs index 45c56de5d..892a2bbfe 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs @@ -14,10 +14,6 @@ protected virtual void Awake() { _interactionComponent = GetComponent(); _spineController = GetComponent(); - } - - protected virtual void Start() - { foreach (var typeToSolver in RestaurantInteractionEventSolvers.TypeToSolver) { var flag = typeToSolver.Key; @@ -32,6 +28,11 @@ protected virtual void Start() } } + protected virtual void Start() + { + + } + public GameObject GetInteractorGameObject() { return _interactionComponent.GetInteractorGameObject(); diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 7921054b4..92f7c8a4d 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -27,6 +27,7 @@ public class RestaurantInteractionComponent : MonoBehaviour, IInteractable, IInt [SerializeField] protected GameFlowState _interactionAvailableFlows; [SerializeField] private Transform[] _aiInteractionPoints; [SerializeField] private bool autoInitialize = true; + private bool _isInitialized = false; private Dictionary _subsystems = new(); @@ -36,7 +37,7 @@ private void OnEnable() var environmentState = RestaurantState.Instance?.EnvironmentState; environmentState?.RegisterInteractable(this); - if (autoInitialize) + if (autoInitialize && !_isInitialized) { InitializeInteraction(_interactionType); } @@ -53,6 +54,11 @@ private void Start() // 보수적으로 Start에서도 등록 시도 (OnEnable 시점에 EnvironmentState가 없었을 경우 대비) var environmentState = RestaurantState.Instance?.EnvironmentState; environmentState?.RegisterInteractable(this); + + if (autoInitialize && !_isInitialized) + { + InitializeInteraction(_interactionType); + } } private static IEnumerable GetAllInteractionTypes() @@ -108,6 +114,7 @@ public GameObject GetInteractableGameObject() public virtual void InitializeInteraction(InteractionType interactionType) { _interactionType = interactionType; + _isInitialized = true; InitializeSubsystems(); } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs index 6edbf5102..d5814a100 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantSubsystemSolver.cs @@ -10,7 +10,7 @@ public abstract class RestaurantSubsystemSolver : MonoBehaviour, IInteraction protected abstract Dictionary GetSubsystemSolverTypeMappings(); - private void Start() + private void Awake() { foreach (var subsystemSolverType in GetSubsystemSolverTypeMappings()) { From 24239dc138d0139dec12ea6c5293ef70a9857498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Mon, 25 Aug 2025 20:14:39 +0900 Subject: [PATCH 07/12] =?UTF-8?q?Customer=20AI=20=EC=A3=BC=EB=AC=B8=20?= =?UTF-8?q?=EC=84=9C=EB=B8=8C=ED=8A=B8=EB=A6=AC=20=EB=B0=8F=20=EB=8D=B0?= =?UTF-8?q?=EC=BD=94=EB=A0=88=EC=9D=B4=ED=84=B0=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=A0=88=EC=8A=A4=ED=86=A0=EB=9E=91=20=EC=94=AC=EC=9A=A9=20?= =?UTF-8?q?=EC=9E=84=EC=8B=9C=20AStarPath=20=EC=8B=B1=EA=B8=80=ED=86=A4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AI/Customer/Subtree/CustomerDefault.asset | 4 +- .../AI/Customer/Subtree/OrderSubtree.asset | 3 + .../Customer/Subtree/OrderSubtree.asset.meta | 8 + .../_Addressables/Prefabs/CustomerNpc.prefab | 40 +++ .../_Addressables/Scenes/Restaurant.unity | 87 +++++++ .../AI/Common/Decorator.meta | 3 + .../AI/Common/Decorator/TimeLimiter.cs | 235 ++++++++++++++++++ .../AI/Common/Decorator/TimeLimiter.cs.meta | 3 + .../Npc/RestaurantNpcMovement.cs | 1 + .../RestaurantOrderInteractionSubsystem.cs | 10 +- .../RestaurantOrderSolver_Wait.cs | 4 +- 11 files changed, 390 insertions(+), 8 deletions(-) create mode 100644 Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset create mode 100644 Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs.meta diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index 5000879f7..02928fce5 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaa2da8aae1c44d5897aa9ce88e57f59ec0f818b204cb20e44bbc6b34eeb11cd -size 86983 +oid sha256:9b4891e275e9cfe98517d3cf01540a621a49b9acf359b93e328956020511e75a +size 87312 diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset new file mode 100644 index 000000000..36968ecfb --- /dev/null +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22534ea39af895e3aa6e79426f9b4ef3374ec7f3a810c0cd6dbc58906755f1b1 +size 22378 diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset.meta b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset.meta new file mode 100644 index 000000000..8e0fb4972 --- /dev/null +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bab8aadc83d64f64b8280e6ebb957e65 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index e8667b395..bb21a5b4c 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -8,6 +8,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2686192822530022837, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_IsTrigger + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Data.m_UniqueID value: 2072347169 @@ -1104,6 +1108,30 @@ PrefabInstance: propertyPath: _availableInteractions value: 2 objectReference: {fileID: 0} + - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: gravity.x + value: NaN + objectReference: {fileID: 0} + - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: gravity.y + value: NaN + objectReference: {fileID: 0} + - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: gravity.z + value: NaN + objectReference: {fileID: 0} + - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: orientation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: enableRotation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5654854357519457123, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: alwaysDrawGizmos + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6336425934484470474, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Materials.Array.size value: 4 @@ -1144,6 +1172,18 @@ PrefabInstance: propertyPath: m_Name value: CustomerNpc objectReference: {fileID: 0} + - target: {fileID: 7545136660434259176, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Constraints + value: 112 + objectReference: {fileID: 0} + - target: {fileID: 7545136660434259176, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_IsKinematic + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8165702938223525558, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: graphMask.value + value: 2 + objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 133104368464330048, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} m_RemovedGameObjects: [] diff --git a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity index a8c9f6c0a..8a9316864 100644 --- a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity +++ b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity @@ -11785,6 +11785,92 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1771012164} m_Mesh: {fileID: 0} +--- !u!1 &1775054119 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1775054121} + - component: {fileID: 1775054120} + m_Layer: 0 + m_Name: AstarPath + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1775054120 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1775054119} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78396926cbbfc4ac3b48fc5fc34a87d1, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1073741824 + data: + dataString: UEsDBBQAAAgIAABIIewaXtoYSgIAALMEAAALACQAZ3JhcGgxLmpzb24KACAAAAAAAAEAGAAAgD7V3rGdAQCAPtXesZ0BAIA+1d6xnQF1U8tu2zAQ/BVD56awZRuOe4ydpoc8CstAgxQ9rMm1RJgiXZKy4xj59+5SjyhNeyI0s7PP0TkRBTgQAd0KpKp88mUw/Dz9NEiENcFW7g6er52zjvCUUdQ6Uy8Yw1KOO4LewUbjN1R5EZqwFlxoVW66lCU8Z9ruWTwe1t/XMsdbNHkoWBlBZVaYK2uaMmPCUKpg3VppbMBReklwaIDHD8hTh1QeWcdzBVchIXt0t3BCd2el2ioBgWox/fMXkVKVaDwhxHKhZNkC42VC/AbELne2MnLt4IDOw0ZpFU4c+qMZmuMcajyACTcO9kVWuS0I7FLaextW+LtSLsYKqzUKbiPDEJTJuZtzD26FsW3Pkn1x8kr4TKBh5vz6F5YuW1THUcHvGBgkB9AVKy5GA2YD5A0Xp3fgyQi0vwXVVpKLdWvruDv0RdznFrR/x6zROVDmH5q1w/4JQh1YW6aE/dIejYdyr2n4r2TGaLdxsxruY9UmWmIApfm6xFqzqHfUtWQqrXkuZ0O8az30MzuQ0FPzvvAb599aJ1Be8T39Ag3V+L9iNPkgadzYCMatYtRK0rqKL+yRW3yoAk2Ib3tg4p6Ou7DG1Kfu77WVNfZ5kxkEhz5k9IjiwejT41NPhoZNeA+HkrSLKjrqTZtXSr63QjKepbNhms7mczEbXc7lBU7kdLZJp7M5yOlEDJM4hTIqKNDfKb8O7WLob+7d20AZM65Q0MEG0fxsV+ngeKNeStvzgDJbmwnyhXmoc3Rj06FB02bldfztez9Fcn5NXv8AUEsDBBQAAAgIAABIIexc6sO8cwAAAIUAAAAJACQAbWV0YS5qc29uCgAgAAAAAAABABgAAIA+1d6xnQEAgD7V3rGdAQCAPtXesZ0Bq1YqSy0qzszPU7JSMNUz1rPQUVBKL0osyCgGChiBOKWZKSB2dF5pTg6Qb2xuZG5gZGRuaZlsbmhhmaKbapJiap5kZGpumZhiapJsoBQLVFVSWZDql5ibiqwzILEkIy0zLyUzL10vKDU5sbjEHWSRUmwtAFBLAQItABQAAAgIAABIIewaXtoYSgIAALMEAAALACQAAAAAAAAAAAAAAAAAAABncmFwaDEuanNvbgoAIAAAAAAAAQAYAACAPtXesZ0BAIA+1d6xnQEAgD7V3rGdAVBLAQItABQAAAgIAABIIexc6sO8cwAAAIUAAAAJACQAAAAAAAAAAAAAAJcCAABtZXRhLmpzb24KACAAAAAAAAEAGAAAgD7V3rGdAQCAPtXesZ0BAIA+1d6xnQFQSwUGAAAAAAIAAgC4AAAAVQMAAAAA + file_cachedStartup: {fileID: 0} + cacheStartup: 0 + showNavGraphs: 1 + showUnwalkableNodes: 1 + debugMode: 4 + debugFloor: 0 + debugRoof: 1 + manualDebugFloorRoof: 0 + showSearchTree: 0 + unwalkableNodeDebugSize: 0.3 + logPathResults: 0 + maxNearestNodeDistance: 100 + scanOnStartup: 1 + fullGetNearestSearch: 0 + prioritizeGraphs: 0 + prioritizeGraphsLimit: 1 + colorSettings: + _SolidColor: {r: 0.11764706, g: 0.4, b: 0.7882353, a: 0.9} + _UnwalkableNode: {r: 1, g: 0, b: 0, a: 0.5} + _BoundsHandles: {r: 0.29, g: 0.454, b: 0.741, a: 0.9} + _ConnectionLowLerp: {r: 0, g: 1, b: 0, a: 0.5} + _ConnectionHighLerp: {r: 1, g: 0, b: 0, a: 0.5} + _MeshEdgeColor: {r: 0, g: 0, b: 0, a: 0.5} + _AreaColors: [] + tagNames: [] + heuristic: 2 + heuristicScale: 1 + threadCount: -1 + maxFrameTime: 10 + batchGraphUpdates: 0 + graphUpdateBatchingInterval: 0.2 + navmeshUpdates: + updateInterval: 0 + euclideanEmbedding: + mode: 0 + seed: 0 + pivotPointRoot: {fileID: 0} + spreadOutCount: 10 + showGraphs: 1 +--- !u!4 &1775054121 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1775054119} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &1784230204 stripped Transform: m_CorrespondingSourceObject: {fileID: 1061695247072719575, guid: 70f56d7d65d2e7842b5bd517ae7fe7fe, type: 3} @@ -16891,3 +16977,4 @@ SceneRoots: - {fileID: 612992553} - {fileID: 761682093} - {fileID: 549344125} + - {fileID: 1775054121} diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator.meta new file mode 100644 index 000000000..871887e4a --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f96045235fcc43c880f2e0ee857b6f2e +timeCreated: 1756111444 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs new file mode 100644 index 000000000..124ba41ac --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs @@ -0,0 +1,235 @@ +using Opsive.BehaviorDesigner.Runtime; +using Opsive.BehaviorDesigner.Runtime.Components; +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Decorators; +using Opsive.GraphDesigner.Runtime; +using Opsive.Shared.Utility; +using Unity.Burst; +using Unity.Entities; +using UnityEngine; + +namespace DDD +{ + [NodeDescription("자식 태스크의 실행 시간을 제한합니다")] + public class TimeLimiter : ILogicNode, IParentNode, ITaskComponentData, IDecorator, ISavableTask + { + [Tooltip("The index of the node.")] + [SerializeField] ushort _Index; + + [Tooltip("The parent index of the node. ushort.MaxValue indicates no parent.")] + [SerializeField] ushort _ParentIndex; + + [Tooltip("The sibling index of the node. ushort.MaxValue indicates no sibling.")] + [SerializeField] ushort _SiblingIndex; + + [Tooltip("최대 실행 시간(초)")] + [SerializeField] float _timeLimit = 30.0f; + + [Tooltip("시간 초과 시 반환할 상태")] + [SerializeField] private TaskStatus _timeoutStatus = TaskStatus.Failure; + + [Header("Debug")] + [Tooltip("로그 출력")] + [SerializeField] private bool _enableDebug = false; + + private ushort _ComponentIndex; + + public ushort Index + { + get => _Index; + set => _Index = value; + } + + public ushort ParentIndex + { + get => _ParentIndex; + set => _ParentIndex = value; + } + + public ushort SiblingIndex + { + get => _SiblingIndex; + set => _SiblingIndex = value; + } + + public ushort RuntimeIndex { get; set; } + + public float TimeLimit + { + get => _timeLimit; + set => _timeLimit = value; + } + + public int MaxChildCount + { + get { return 1; } + } + + public ComponentType Tag + { + get => typeof(TimeLimiterTag); + } + + public System.Type SystemType + { + get => typeof(TimeLimiterTaskSystem); + } + + + public void AddBufferElement(World world, Entity entity) + { + DynamicBuffer buffer; + if (world.EntityManager.HasBuffer(entity)) + { + buffer = world.EntityManager.GetBuffer(entity); + } + else + { + buffer = world.EntityManager.AddBuffer(entity); + } + + buffer.Add(new TimeLimiterComponent() + { + Index = RuntimeIndex, + TimeLimit = _timeLimit, + TimeoutStatus = _timeoutStatus, + }); + _ComponentIndex = (ushort)(buffer.Length - 1); + } + + public void ClearBufferElement(World world, Entity entity) + { + if (world.EntityManager.HasBuffer(entity)) + { + var buffer = world.EntityManager.GetBuffer(entity); + buffer.Clear(); + } + } + + public MemberVisibility GetSaveReflectionType(int index) + { + return MemberVisibility.None; + } + + public object Save(World world, Entity entity) + { + var timeLimiterComponents = world.EntityManager.GetBuffer(entity); + var timeLimiterComponent = timeLimiterComponents[_ComponentIndex]; + + return timeLimiterComponent.StartTime; + } + + public void Load(object saveData, World world, Entity entity) + { + var timeLimiterComponents = world.EntityManager.GetBuffer(entity); + var timeLimiterComponent = timeLimiterComponents[_ComponentIndex]; + + timeLimiterComponent.StartTime = (float)saveData; + timeLimiterComponents[_ComponentIndex] = timeLimiterComponent; + } + } + + public struct TimeLimiterComponent : IBufferElementData + { + [Tooltip("The index of the node.")] + public ushort Index; + + [Tooltip("최대 실행 시간(초)")] + public float TimeLimit; + + [Tooltip("실행 시작 시간(초)")] + public float StartTime; + + [Tooltip("Should the task end when the child returns failure?")] + public TaskStatus TimeoutStatus; + } + + public struct TimeLimiterTag : IComponentData, IEnableableComponent { } + + [DisableAutoCreation] + public partial struct TimeLimiterTaskSystem : ISystem + { + [BurstCompile] + private void OnUpdate(ref SystemState state) + { + var query = SystemAPI.QueryBuilder().WithAllRW().WithAllRW().WithAllRW().WithAll().Build(); + state.Dependency = new TimeLimiterJob() + { + CurrentTime = (float)SystemAPI.Time.ElapsedTime + }.ScheduleParallel(query, state.Dependency); + } + + [BurstCompile] + private partial struct TimeLimiterJob : IJobEntity + { + public float CurrentTime; + + [BurstCompile] + public void Execute(ref DynamicBuffer branchComponents, + ref DynamicBuffer taskComponents, + ref DynamicBuffer timeLimiterComponents) + { + for (int i = 0; i < timeLimiterComponents.Length; ++i) + { + var timeLimiterComponent = timeLimiterComponents[i]; + var taskComponent = taskComponents[timeLimiterComponent.Index]; + var branchComponent = branchComponents[taskComponent.BranchIndex]; + TaskComponent childTaskComponent; + + if (taskComponent.Status == TaskStatus.Queued) + { + taskComponent.Status = TaskStatus.Running; + taskComponents[taskComponent.Index] = taskComponent; + + timeLimiterComponent.StartTime = CurrentTime; + timeLimiterComponents[i] = timeLimiterComponent; + + childTaskComponent = taskComponents[taskComponent.Index + 1]; + childTaskComponent.Status = TaskStatus.Queued; + taskComponents[taskComponent.Index + 1] = childTaskComponent; + + branchComponent.NextIndex = taskComponent.Index + 1; + branchComponents[taskComponent.BranchIndex] = branchComponent; + continue; + } + else if (taskComponent.Status != TaskStatus.Running) + { + continue; + } + + if (timeLimiterComponent.StartTime >= 0f && + CurrentTime - timeLimiterComponent.StartTime >= timeLimiterComponent.TimeLimit) { + // 시간 초과 + taskComponent.Status = timeLimiterComponent.TimeoutStatus; + taskComponents[taskComponent.Index] = taskComponent; + + // 자식 태스크가 실행 중이면 중단 + childTaskComponent = taskComponents[taskComponent.Index + 1]; + if (childTaskComponent.Status == TaskStatus.Running || + childTaskComponent.Status == TaskStatus.Queued) { + childTaskComponent.Status = timeLimiterComponent.TimeoutStatus; + taskComponents[taskComponent.Index + 1] = childTaskComponent; + } + + branchComponent.NextIndex = taskComponent.ParentIndex; + branchComponents[taskComponent.BranchIndex] = branchComponent; + continue; + } + + childTaskComponent = taskComponents[taskComponent.Index + 1]; + if (childTaskComponent.Status == TaskStatus.Queued || + childTaskComponent.Status == TaskStatus.Running) { + // The child should keep running. + continue; + } + + taskComponent.Status = childTaskComponent.Status; + taskComponents[taskComponent.Index] = taskComponent; + + branchComponent.NextIndex = taskComponent.ParentIndex; + branchComponents[taskComponent.BranchIndex] = branchComponent; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs.meta new file mode 100644 index 000000000..269fc297d --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d5da50af45c8438eb9677fd18378f9b4 +timeCreated: 1756111556 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcMovement.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcMovement.cs index cd32293cb..e73acf69f 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcMovement.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Npc/RestaurantNpcMovement.cs @@ -101,6 +101,7 @@ public bool HasReachedDestination() public bool IsPositionMovable(Vector3 endPosition) { + var nearestNode = AstarPath.active.GetNearest(endPosition).node; return nearestNode != null && nearestNode.Walkable; } diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index 90bca043f..bca226197 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -25,11 +25,11 @@ private void Start() public bool CanInteract() { - if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) - { - return true; - } - return false; + //if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) + //{ + // return true; + //} + return true; } public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs index 14f6f77d9..214412cdd 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs @@ -1,3 +1,4 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; using UnityEngine; namespace DDD.RestaurantOrders @@ -6,7 +7,8 @@ public class RestaurantOrderSolver_Wait : MonoBehaviour, IInteractionSubsystemSo { public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) { - // TODO : DO SOMETHING!!! + if (CanExecuteInteractionSubsystem(interactor, interactable, payloadSo) == false) return false; + return true; } From 1663ff055c717c3caad10b51bab1319e664c6150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Tue, 26 Aug 2025 17:37:17 +0900 Subject: [PATCH 08/12] =?UTF-8?q?=EB=A0=88=EC=8A=A4=ED=86=A0=EB=9E=91=20?= =?UTF-8?q?=EC=8B=9D=EC=82=AC=20=EC=9D=B8=ED=84=B0=EB=9E=99=EC=85=98=20?= =?UTF-8?q?=EC=84=9C=EB=B8=8C=20=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EB=B0=8F=20?= =?UTF-8?q?=EC=86=94=EB=B2=84=20=EC=B4=88=EA=B8=B0=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AI/Customer/Subtree/CustomerDefault.asset | 2 +- .../AI/Customer/Subtree/OrderSubtree.asset | 4 +- .../_Addressables/Prefabs/CustomerNpc.prefab | 12 +++ .../Prefabs/RestaurantPlayer.prefab | 2 +- .../_Addressables/Scenes/Restaurant.unity | 3 +- .../DataObjects/RestaurantPlayerData.asset | 4 +- .../GameEvent/InteractionSubsystem.cs | 1 + .../AI/Common/Decorator/TimeLimiter.cs | 10 +-- .../Customer/Actions/StartRestaurantOrder.cs | 17 +++- .../Actions/WaitForPlayerInteraction.cs | 80 +++++++++++++++++++ .../Actions/WaitForPlayerInteraction.cs.meta | 3 + .../Conditionals/RestaurantOrderAvailable.cs | 9 ++- ...estaurantManagementInteractionSubsystem.cs | 5 ++ .../RestaurantMealInteractionSubsystem.cs | 57 +++++++++++++ ...RestaurantMealInteractionSubsystem.cs.meta | 3 + .../RestaurantOrderInteractionSubsystem.cs | 7 +- .../RestaurantInteractionComponent.cs | 3 +- .../RestaurantInteractionEvents.cs | 3 +- .../RestaurantManagementSolver.cs | 10 +-- .../Solvers/RestaurantMeals.meta | 3 + .../RestaurantMeals/RestaurantMealSolver.cs | 18 +++++ .../RestaurantMealSolver.cs.meta | 3 + .../RestaurantMealSolver_WaitForOrder.cs | 19 +++++ .../RestaurantMealSolver_WaitForOrder.cs.meta | 3 + .../RestaurantMealSolver_WaitForServe.cs | 18 +++++ .../RestaurantMealSolver_WaitForServe.cs.meta | 3 + .../RestaurantOrderSolver.cs | 10 +-- .../RestaurantOrderSolver.cs.meta | 0 ProjectSettings/TagManager.asset | 4 +- 29 files changed, 277 insertions(+), 39 deletions(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs.meta create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs.meta rename Assets/_DDD/_Scripts/RestaurantEvent/Solvers/{ => RestaurantOrders}/RestaurantOrderSolver.cs (79%) rename Assets/_DDD/_Scripts/RestaurantEvent/Solvers/{ => RestaurantOrders}/RestaurantOrderSolver.cs.meta (100%) diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset index 02928fce5..0ea95f8d3 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/CustomerDefault.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b4891e275e9cfe98517d3cf01540a621a49b9acf359b93e328956020511e75a +oid sha256:a7ca4b40dc25f4a6ff14a7cbdb2a8be04431ba958038b899fd700df86c4f9618 size 87312 diff --git a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset index 36968ecfb..8434d7b80 100644 --- a/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset +++ b/Assets/_DDD/_Addressables/AI/Customer/Subtree/OrderSubtree.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22534ea39af895e3aa6e79426f9b4ef3374ec7f3a810c0cd6dbc58906755f1b1 -size 22378 +oid sha256:817cecbbecbe8a6519225bc1d0fce376c0dfb14a240c248e3fbdc8a93f585f72 +size 20385 diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index bb21a5b4c..0241686e7 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -10,6 +10,10 @@ PrefabInstance: m_Modifications: - target: {fileID: 2686192822530022837, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_IsTrigger + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3540956906288785900, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer value: 0 objectReference: {fileID: 0} - target: {fileID: 3854744934792897056, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} @@ -1172,6 +1176,10 @@ PrefabInstance: propertyPath: m_Name value: CustomerNpc objectReference: {fileID: 0} + - target: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7545136660434259176, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Constraints value: 112 @@ -1180,6 +1188,10 @@ PrefabInstance: propertyPath: m_IsKinematic value: 0 objectReference: {fileID: 0} + - target: {fileID: 8155105186346135386, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + propertyPath: m_Layer + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8165702938223525558, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: graphMask.value value: 2 diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab index a66d69676..f842662b8 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab @@ -426,7 +426,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 81e01dd8c1cc3404d805400eba1bb4ae, type: 3} m_Name: m_EditorClassIdentifier: - _availableInteractions: 1 + _availableInteractions: 5 _nearColliders: - {fileID: 0} - {fileID: 0} diff --git a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity index 8a9316864..d51dbcf6a 100644 --- a/Assets/_DDD/_Addressables/Scenes/Restaurant.unity +++ b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity @@ -474,7 +474,8 @@ PrefabInstance: propertyPath: m_Name value: Prop_CustomerTable_002 objectReference: {fileID: 0} - m_RemovedComponents: [] + m_RemovedComponents: + - {fileID: 551358949302262764, guid: 0b1ba2f28535d5147bc0ddf354d0712f, type: 3} m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] diff --git a/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset b/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset index 85efaff85..4d63d37ff 100644 --- a/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset +++ b/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49fc3b72bcb23f6bb08a7531c01cfd1fb185e04975122fd2437f751b3855ab78 -size 1994 +oid sha256:c547bb4c8e960c6504b74f52fce7db1ef4e186627a316a5d33086c848c515ec2 +size 1999 diff --git a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs index 655419a6e..5467d9e77 100644 --- a/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/GameEvent/InteractionSubsystem.cs @@ -12,6 +12,7 @@ public interface IInteractionSubsystemObject public interface IInteractionSubsystemObject : IInteractionSubsystemObject where T : Enum { T GetInteractionSubsystemType(); + void SetInteractionSubsystemType(T inValue); } public interface IInteractionSubsystemSolver diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs index 124ba41ac..ec725c587 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Decorator/TimeLimiter.cs @@ -14,13 +14,13 @@ namespace DDD public class TimeLimiter : ILogicNode, IParentNode, ITaskComponentData, IDecorator, ISavableTask { [Tooltip("The index of the node.")] - [SerializeField] ushort _Index; + [SerializeField, HideInInspector] ushort _Index; [Tooltip("The parent index of the node. ushort.MaxValue indicates no parent.")] - [SerializeField] ushort _ParentIndex; + [SerializeField, HideInInspector] ushort _ParentIndex; [Tooltip("The sibling index of the node. ushort.MaxValue indicates no sibling.")] - [SerializeField] ushort _SiblingIndex; + [SerializeField, HideInInspector] ushort _SiblingIndex; [Tooltip("최대 실행 시간(초)")] [SerializeField] float _timeLimit = 30.0f; @@ -28,10 +28,6 @@ public class TimeLimiter : ILogicNode, IParentNode, ITaskComponentData, IDecorat [Tooltip("시간 초과 시 반환할 상태")] [SerializeField] private TaskStatus _timeoutStatus = TaskStatus.Failure; - [Header("Debug")] - [Tooltip("로그 출력")] - [SerializeField] private bool _enableDebug = false; - private ushort _ComponentIndex; public ushort Index diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs index 336001e00..7fa600a90 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs @@ -12,6 +12,16 @@ public class StartRestaurantOrder : Action [SerializeField] private bool _requireCanInteract = true; [Tooltip("성공 시 블랙보드에 현재 인터랙션 대상을 등록합니다")] [SerializeField] private bool _registerOnBlackboard = true; + + private IInteractor _interactor; + private bool _isGetInteractor; + + public override void OnStart() + { + _isGetInteractor = gameObject.TryGetComponent(out _interactor); + if (!_isGetInteractor) + Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}"); + } public override TaskStatus OnUpdate() { @@ -26,13 +36,12 @@ public override TaskStatus OnUpdate() // TODO : 아래 상호작용 수행 로직이 우리 프로젝트의 권장하는 방식이 아님. 플레이어가 오브젝트에 인터랙션하는 것과 비슷한 흐름으로 NPC가 오브젝트에 인터랙션하게 만들 것. // 상호작용 수행: 액션이 붙은 에이전트를 Interactor로 사용 - var isGetInteractor = gameObject.TryGetComponent(out var interactor); - if (!isGetInteractor || !interactor.CanInteractTo(outInteractable)) + if (!_isGetInteractor || !_interactor.CanInteractTo(outInteractable)) { return TaskStatus.Failure; } - var interacted = outInteractable.OnInteracted(interactor); + var interacted = outInteractable.OnInteracted(_interactor); if (!interacted) { return TaskStatus.Failure; @@ -41,7 +50,7 @@ public override TaskStatus OnUpdate() if (_registerOnBlackboard) { // 공용 블랙보드 우선 - var shared = gameObject.GetComponentInParent(); + var shared = gameObject.GetComponentInChildren(); if (shared != null) { shared.SetCurrentInteractionTarget(outInteractable.gameObject); diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs new file mode 100644 index 000000000..659047263 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs @@ -0,0 +1,80 @@ +using Opsive.BehaviorDesigner.Runtime.Tasks; +using Opsive.BehaviorDesigner.Runtime.Tasks.Actions; +using UnityEngine; + +namespace DDD +{ + //범용적으로 사용할 수 있을 것 같음 + //차후 제네릭으로 변경 가능성 있음 + public class WaitForPlayerInteraction : Action + { + [Tooltip("기다릴 상호작용 타입")] + [SerializeField] private RestaurantMealType _targetOrderType = RestaurantMealType.WaitForOrder; + + private IInteractionSubsystemObject _interactionSubsystem; + private bool _isGetInteractionSubsystem; + + public override void OnStart() + { + GameObject interactionTarget = null; + var shared = gameObject.GetComponentInChildren(); + if (shared != null) + { + interactionTarget = shared.GetCurrentInteractionTarget(); + } + else + { + // 하위 호환: 고객 전용 블랙보드 지원 + var customerBb = gameObject.GetComponentInParent(); + interactionTarget = customerBb?.GetCurrentInteractionTarget(); + } + + if (interactionTarget == null) + { + Debug.LogError($"[{GetType().Name}] interactionTarget을 찾을 수 없습니다: {gameObject.name}"); + return; + } + + if (!interactionTarget.TryGetComponent(out var interactionComponent)) + Debug.LogError($"[{interactionTarget.name}] {nameof(interactionComponent)}를 찾을 수 없습니다: {gameObject.name}"); + if (interactionComponent is IInteractionSubsystemOwner subsystemOwner) + { + if (!subsystemOwner.TryGetSubsystemObject(out var subsystem)) + { + Debug.LogError($"[{GetType().Name}] {nameof(_targetOrderType)}의 Subsystem을 찾을 수 없습니다: {gameObject.name}"); + _isGetInteractionSubsystem = false; + return; + } + + _isGetInteractionSubsystem = true; + subsystem.SetInteractionSubsystemType(_targetOrderType); + + if (!gameObject.TryGetComponent(out var interactor)) + { + Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}"); + return; + } + + interactor.CanInteractTo(interactionComponent); + + _interactionSubsystem = subsystem; + } + } + + public override TaskStatus OnUpdate() + { + if (!_isGetInteractionSubsystem) return TaskStatus.Failure; + + TaskStatus result = CheckToSubsystemStatus(); + if (result == TaskStatus.Success) Debug.Log($"[{GetType().Name}] Success"); + return result; + } + + private TaskStatus CheckToSubsystemStatus() + { + return _interactionSubsystem.GetInteractionSubsystemType() == _targetOrderType + ? TaskStatus.Running + : TaskStatus.Success; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs.meta new file mode 100644 index 000000000..e9b41353b --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4bb97122045148169906d2f7b04a712e +timeCreated: 1756171540 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs index d6f49b45d..b10254f84 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Conditionals/RestaurantOrderAvailable.cs @@ -1,3 +1,5 @@ +using System; +using System.Collections.Generic; using Opsive.BehaviorDesigner.Runtime.Tasks; using Opsive.BehaviorDesigner.Runtime.Tasks.Conditionals; using UnityEngine; @@ -32,7 +34,7 @@ public override TaskStatus OnUpdate() } - public static TaskStatus FindAvailableOrderInteractable(bool checkCanInteract, RestaurantOrderType targetOrderType, out RestaurantInteractionComponent outInteractable) + public static TaskStatus FindAvailableOrderInteractable(bool checkCanInteract, T targetOrderType, out RestaurantInteractionComponent outInteractable) where T : Enum { outInteractable = null; @@ -49,9 +51,10 @@ public static TaskStatus FindAvailableOrderInteractable(bool checkCanInteract, R // 서브시스템에서 RestaurantOrderType을 가져와 비교 outInteractable = interactable as RestaurantInteractionComponent; if (outInteractable == null) continue; - if (!outInteractable.TryGetSubsystemObject(out var subsystem)) continue; + if (!outInteractable.TryGetSubsystemObject(out var subsystem)) continue; - if (subsystem.GetInteractionSubsystemType() == targetOrderType) + if (EqualityComparer.Default.Equals(subsystem.GetInteractionSubsystemType(), targetOrderType) + ) { // CheckCanInteract이 false면 타입만 맞으면 성공 if (!checkCanInteract) diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs index 8be8f9b3f..aadded097 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantManagementInteractionSubsystem.cs @@ -18,6 +18,11 @@ public RestaurantManagementType GetInteractionSubsystemType() return _managementType; } + public void SetInteractionSubsystemType(RestaurantManagementType inValue) + { + _managementType = inValue; + } + public void InitializeSubsystem() { diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs new file mode 100644 index 000000000..8c7924467 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs @@ -0,0 +1,57 @@ +using System; +using UnityEngine; + +namespace DDD +{ + public enum RestaurantMealType : uint + { + None = 0u, + WaitForOrder = 1u, + WaitForServe = 1u << 1 + } + public class RestaurantMealInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject + { + private RestaurantMealType _currentRestaurantMealType; + private void Awake() + { + _currentRestaurantMealType = RestaurantMealType.None; + } + public RestaurantMealType GetInteractionSubsystemType() + { + return _currentRestaurantMealType; + } + + public void SetInteractionSubsystemType(RestaurantMealType inValue) + { + _currentRestaurantMealType = inValue; + } + + public void InitializeSubsystem() + { + _currentRestaurantMealType = RestaurantMealType.None; + } + + public bool CanInteract() + { + return _currentRestaurantMealType != RestaurantMealType.None; + } + + public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) + { + var prev = _currentRestaurantMealType; + _currentRestaurantMealType = GetNextState(prev); + return true; + } + + private RestaurantMealType GetNextState(RestaurantMealType state) + { + switch (state) + { + case RestaurantMealType.None : return RestaurantMealType.WaitForOrder; + case RestaurantMealType.WaitForOrder : return RestaurantMealType.WaitForServe; + case RestaurantMealType.WaitForServe : return RestaurantMealType.None; + default: return RestaurantMealType.None; + } + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs.meta b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs.meta new file mode 100644 index 000000000..16a96ce29 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 31d5c600061a4f05b19824e068e0c2af +timeCreated: 1756176676 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs index bca226197..6aad9c9e4 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs @@ -42,7 +42,7 @@ public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = nu public void InitializeSubsystem() { - + currentRestaurantOrderType = orderType; } public RestaurantOrderType GetInteractionSubsystemType() @@ -50,6 +50,11 @@ public RestaurantOrderType GetInteractionSubsystemType() return currentRestaurantOrderType; } + public void SetInteractionSubsystemType(RestaurantOrderType inValue) + { + currentRestaurantOrderType = inValue; + } + private RestaurantOrderType GetNextState(RestaurantOrderType state) { switch (state) diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs index 92f7c8a4d..f47950b38 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionComponent.cs @@ -12,7 +12,8 @@ public static class RestaurantInteractionSubsystems public static Dictionary TypeToSubsystem = new() { {InteractionType.RestaurantOrder, typeof(RestaurantOrderInteractionSubsystem)}, - {InteractionType.RestaurantManagement, typeof(RestaurantManagementInteractionSubsystem)} + {InteractionType.RestaurantManagement, typeof(RestaurantManagementInteractionSubsystem)}, + {InteractionType.RestaurantMeal, typeof(RestaurantMealInteractionSubsystem)} }; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs index 2afa9b785..25599849e 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/RestaurantInteractionEvents.cs @@ -14,7 +14,8 @@ public static class RestaurantInteractionEventSolvers public static Dictionary TypeToSolver = new() { {InteractionType.RestaurantManagement, typeof(RestaurantManagementSolver)}, - {InteractionType.RestaurantOrder, typeof(RestaurantOrderSolver)} + {InteractionType.RestaurantOrder, typeof(RestaurantOrderSolver)}, + {InteractionType.RestaurantMeal, typeof(RestaurantMealSolver)} }; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs index 0681cfb69..6f7dcde21 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantManagements/RestaurantManagementSolver.cs @@ -5,19 +5,17 @@ namespace DDD { - public static class RestaurantManagementSolvers + public class RestaurantManagementSolver : RestaurantSubsystemSolver { - public static Dictionary TypeToManagementSolver = new() + + private Dictionary _typeToManagementSolver = new() { { RestaurantManagementType.OpenRestaurantMenu, typeof(RestaurantManagementSolver_Menu) }, { RestaurantManagementType.StartRestaurant, typeof(RestaurantManagementSolver_Start) } }; - } - public class RestaurantManagementSolver : RestaurantSubsystemSolver - { protected override Dictionary GetSubsystemSolverTypeMappings() { - return RestaurantManagementSolvers.TypeToManagementSolver; + return _typeToManagementSolver; } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals.meta new file mode 100644 index 000000000..00588c64d --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 601164c0231c43fca9349170e1e0ccec +timeCreated: 1756176395 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs new file mode 100644 index 000000000..cd4b2a565 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace DDD +{ + public class RestaurantMealSolver : RestaurantSubsystemSolver + { + private Dictionary _typeToMealSolver = new() + { + { RestaurantMealType.WaitForOrder, typeof(RestaurantMealSolver_WaitForOrder) }, + { RestaurantMealType.WaitForServe, typeof(RestaurantMealSolver_WaitForServe) } + }; + protected override Dictionary GetSubsystemSolverTypeMappings() + { + return _typeToMealSolver; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs.meta new file mode 100644 index 000000000..f0fbded31 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 391c551614be4f21a2e700f44569e92a +timeCreated: 1756176491 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs new file mode 100644 index 000000000..c17717631 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace DDD +{ + public class RestaurantMealSolver_WaitForOrder : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs.meta new file mode 100644 index 000000000..b77d17fa1 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cff2611181194e4a92576bdbcead4fad +timeCreated: 1756181225 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs new file mode 100644 index 000000000..f46d22e80 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace DDD +{ + public class RestaurantMealSolver_WaitForServe : MonoBehaviour, IInteractionSubsystemSolver + { + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + { + return true; + } + + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject payloadSo = null) + { + return true; + } + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs.meta new file mode 100644 index 000000000..4174d79c1 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e9292616267b4299a3d2e0d29c84f69b +timeCreated: 1756181667 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver.cs similarity index 79% rename from Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs rename to Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver.cs index e3857aa52..71d8149fa 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver.cs @@ -5,9 +5,9 @@ namespace DDD { - public static class RestaurantOrderSolvers + public class RestaurantOrderSolver : RestaurantSubsystemSolver { - public static Dictionary TypeToOrderSolver = new() + private Dictionary _typeToOrderSolver = new() { { RestaurantOrderType.Wait, typeof(RestaurantOrderSolver_Wait) }, { RestaurantOrderType.Reserved, typeof(RestaurantOrderSolver_Reserved) }, @@ -16,13 +16,9 @@ public static class RestaurantOrderSolvers { RestaurantOrderType.Busy, typeof(RestaurantOrderSolver_Busy) }, { RestaurantOrderType.Dirty, typeof(RestaurantOrderSolver_Dirty) } }; - } - - public class RestaurantOrderSolver : RestaurantSubsystemSolver - { protected override Dictionary GetSubsystemSolverTypeMappings() { - return RestaurantOrderSolvers.TypeToOrderSolver; + return _typeToOrderSolver; } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs.meta b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver.cs.meta similarity index 100% rename from Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrderSolver.cs.meta rename to Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver.cs.meta diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 04c98086f..63e0e52b4 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79fb0bf613721f4ea379a4d4434fa621933ea25eeb09ee4cb3878ca462a07077 -size 623 +oid sha256:411a0243cb87e0bcd8781e3198ba1f82af7279c14555e3b2db93884f5b7ea700 +size 636 From 92e2cda1a9da74f2e7c484413e219aa9c5d99985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Tue, 26 Aug 2025 17:43:51 +0900 Subject: [PATCH 09/12] =?UTF-8?q?Payload=20=EC=B6=94=EA=B0=80=EB=90=9C=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=20=EB=A8=B8=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interactions/RestaurantMealInteractionSubsystem.cs | 7 ++++++- .../RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs | 6 +++--- .../RestaurantMeals/RestaurantMealSolver_WaitForServe.cs | 6 +++--- .../Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs | 6 ++++-- .../RestaurantOrders/RestaurantOrderSolver_Dirty.cs | 6 +++--- .../Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs index 8c7924467..d018dc86b 100644 --- a/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs +++ b/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantMealInteractionSubsystem.cs @@ -42,7 +42,12 @@ public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = nu _currentRestaurantMealType = GetNextState(prev); return true; } - + + public ScriptableObject GetPayload() + { + return null; + } + private RestaurantMealType GetNextState(RestaurantMealType state) { switch (state) diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs index c17717631..59236cb16 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForOrder.cs @@ -4,13 +4,13 @@ namespace DDD { public class RestaurantMealSolver_WaitForOrder : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs index f46d22e80..86851c9f0 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantMeals/RestaurantMealSolver_WaitForServe.cs @@ -4,13 +4,13 @@ namespace DDD { public class RestaurantMealSolver_WaitForServe : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs index da7bad36a..a53ef8b77 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Busy.cs @@ -4,15 +4,17 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Busy : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, + ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { // TODO : DO SOMETHING!!! return true; } public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { + // TODO : DO SOMETHING!!! return true; } } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs index 571cbd9a0..8819bfe60 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Dirty.cs @@ -4,14 +4,14 @@ namespace DDD.RestaurantOrders { public class RestaurantOrderSolver_Dirty : MonoBehaviour, IInteractionSubsystemSolver { - public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) + public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { // TODO : DO SOMETHING!!! return true; } - public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, - ScriptableObject payloadSo = null) + public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, + ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { return true; } diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs index 94917688b..8667bddda 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs @@ -7,7 +7,7 @@ public class RestaurantOrderSolver_Wait : MonoBehaviour, IInteractionSubsystemSo { public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject causerPayload = null, ScriptableObject targetPayloadSo = null) { - if (CanExecuteInteractionSubsystem(interactor, interactable, payloadSo) == false) return false; + if (CanExecuteInteractionSubsystem(interactor, interactable, causerPayload, targetPayloadSo) == false) return false; return true; } From b57cc459027213c5e0072150f41366d894947cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=82=B0?= Date: Tue, 26 Aug 2025 19:14:52 +0900 Subject: [PATCH 10/12] =?UTF-8?q?=EB=A9=94=EB=AA=A8=EB=A6=AC=20=EB=88=84?= =?UTF-8?q?=EC=88=98,=20UI=20=EB=B3=80=EA=B2=BD=EC=A0=90=20=EB=A8=B8?= =?UTF-8?q?=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_Addressables/Prefabs/CustomerNpc.prefab | 25 ++++- .../DataObjects/RestaurantPlayerData.asset | 4 +- .../Ui/Common/EmptyIngredient.png.meta | 13 +++ .../CookUiPanel/CookIngredientPanel.png.meta | 13 +++ .../Ui/CookUiPanel/CookMenuPanel.png.meta | 13 +++ .../Ui/CookUiPanel/SelectedCookPanel.png.meta | 13 +++ .../SelectedCookwarePanel.png.meta | 13 +++ .../Common/Actions/MoveToInteractionTarget.cs | 2 + .../Actions/WaitForPlayerInteraction.cs | 94 ++++++++++++------- ProjectSettings/EditorBuildSettings.asset | 2 +- 10 files changed, 152 insertions(+), 40 deletions(-) diff --git a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab index 0241686e7..80cdc789c 100644 --- a/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/CustomerNpc.prefab @@ -1178,7 +1178,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Layer - value: 0 + value: 16 objectReference: {fileID: 0} - target: {fileID: 7545136660434259176, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} propertyPath: m_Constraints @@ -1210,6 +1210,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} insertIndex: -1 addedObject: {fileID: 3825874317044733320} + - targetCorrespondingSourceObject: {fileID: 7462519206451630147, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} + insertIndex: -1 + addedObject: {fileID: 1122074513716966771} m_SourcePrefab: {fileID: 100100000, guid: ceeea618d8ee23642a0e56b3f963448c, type: 3} --- !u!1 &4266090516809920735 stripped GameObject: @@ -1252,3 +1255,23 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: af69e82818254bfa9cabb2dbf9430850, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &1122074513716966771 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4266090516809920735} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 201f9e6d7ca7404baa9945950292a392, type: 3} + m_Name: + m_EditorClassIdentifier: + _interactionType: 4 + _executionParameters: + _holdTime: 0 + _displayParameters: + _messageKey: + _interactionAvailableFlows: 2 + _aiInteractionPoints: [] + autoInitialize: 1 diff --git a/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset b/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset index 4d63d37ff..890a0f723 100644 --- a/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset +++ b/Assets/_DDD/_Addressables/So/RestaurantData/DataObjects/RestaurantPlayerData.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c547bb4c8e960c6504b74f52fce7db1ef4e186627a316a5d33086c848c515ec2 -size 1999 +oid sha256:c0b7877dd04da4027a47c923d7c38dbbdb1c4aae40c4a709411f0845190e7cf7 +size 2001 diff --git a/Assets/_DDD/_Raw/Sprites/Ui/Common/EmptyIngredient.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/Common/EmptyIngredient.png.meta index c64b846d2..2a7c52818 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/Common/EmptyIngredient.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/Common/EmptyIngredient.png.meta @@ -119,6 +119,19 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookIngredientPanel.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookIngredientPanel.png.meta index c43ff382f..5ae0d3fcc 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookIngredientPanel.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookIngredientPanel.png.meta @@ -119,6 +119,19 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookMenuPanel.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookMenuPanel.png.meta index 8b52c85b4..c63239c25 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookMenuPanel.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/CookMenuPanel.png.meta @@ -119,6 +119,19 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookPanel.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookPanel.png.meta index 9f8ee0508..f8fad6a20 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookPanel.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookPanel.png.meta @@ -119,6 +119,19 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookwarePanel.png.meta b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookwarePanel.png.meta index bf3e4ea5b..b7ba6dd19 100644 --- a/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookwarePanel.png.meta +++ b/Assets/_DDD/_Raw/Sprites/Ui/CookUiPanel/SelectedCookwarePanel.png.meta @@ -119,6 +119,19 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs index 192081afc..828782504 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Common/Actions/MoveToInteractionTarget.cs @@ -29,6 +29,7 @@ public class MoveToInteractionTarget : Action public override void OnStart() { + if (cachedTarget != null) return; movement = gameObject.GetComponentInParent(); repathTimer = 0f; isMoving = false; @@ -43,6 +44,7 @@ public override TaskStatus OnUpdate() var target = GetTarget(); if (target == null) return failIfNoTarget ? TaskStatus.Failure : TaskStatus.Success; + Debug.Log(target.name); if (ShouldUpdateDestination()) { diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs index 659047263..220788be6 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/WaitForPlayerInteraction.cs @@ -16,49 +16,71 @@ public class WaitForPlayerInteraction : Action public override void OnStart() { - GameObject interactionTarget = null; - var shared = gameObject.GetComponentInChildren(); - if (shared != null) + // 의자가 복합 상태를 가지게 될 경우 + // GameObject interactionTarget = null; + // var shared = gameObject.GetComponentInChildren(); + // if (shared != null) + // { + // interactionTarget = shared.GetCurrentInteractionTarget(); + // } + // else + // { + // // 하위 호환: 고객 전용 블랙보드 지원 + // var customerBb = gameObject.GetComponentInParent(); + // interactionTarget = customerBb?.GetCurrentInteractionTarget(); + // } + // + // if (interactionTarget == null) + // { + // Debug.LogError($"[{GetType().Name}] interactionTarget을 찾을 수 없습니다: {gameObject.name}"); + // return; + // } + // + // if (!interactionTarget.TryGetComponent(out var interactionComponent)) + // Debug.LogError($"[{interactionTarget.name}] {nameof(interactionComponent)}를 찾을 수 없습니다: {gameObject.name}"); + // if (interactionComponent is IInteractionSubsystemOwner subsystemOwner) + // { + // if (!subsystemOwner.TryGetSubsystemObject(out var subsystem)) + // { + // Debug.LogError($"[{GetType().Name}] {nameof(_targetOrderType)}의 Subsystem을 찾을 수 없습니다: {gameObject.name}"); + // _isGetInteractionSubsystem = false; + // return; + // } + // + // _isGetInteractionSubsystem = true; + // subsystem.SetInteractionSubsystemType(_targetOrderType); + // + // if (!gameObject.TryGetComponent(out var interactor)) + // { + // Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}"); + // return; + // } + // + // interactor.CanInteractTo(interactionComponent); + // + // _interactionSubsystem = subsystem; + // } + + if (!gameObject.TryGetComponent(out var interactionComponent)) { - interactionTarget = shared.GetCurrentInteractionTarget(); - } - else - { - // 하위 호환: 고객 전용 블랙보드 지원 - var customerBb = gameObject.GetComponentInParent(); - interactionTarget = customerBb?.GetCurrentInteractionTarget(); + Debug.LogError($"[{GetType().Name}]에서 interactionComponent를 찾을 수 없습니다: {gameObject.name}"); + return; } - if (interactionTarget == null) + if (interactionComponent is not IInteractionSubsystemOwner subsystemOwner) { - Debug.LogError($"[{GetType().Name}] interactionTarget을 찾을 수 없습니다: {gameObject.name}"); + Debug.LogError($"[{GetType().Name}]에서 {nameof(IInteractionSubsystemOwner)}를 찾을 수 없습니다: {gameObject.name}"); + return; + } + + if (!subsystemOwner.TryGetSubsystemObject(out _interactionSubsystem)) + { + Debug.LogError($"[{GetType().Name}]에서 {nameof(IInteractionSubsystemObject)}를 찾을 수 없습니다: {gameObject.name}"); return; } - if (!interactionTarget.TryGetComponent(out var interactionComponent)) - Debug.LogError($"[{interactionTarget.name}] {nameof(interactionComponent)}를 찾을 수 없습니다: {gameObject.name}"); - if (interactionComponent is IInteractionSubsystemOwner subsystemOwner) - { - if (!subsystemOwner.TryGetSubsystemObject(out var subsystem)) - { - Debug.LogError($"[{GetType().Name}] {nameof(_targetOrderType)}의 Subsystem을 찾을 수 없습니다: {gameObject.name}"); - _isGetInteractionSubsystem = false; - return; - } - - _isGetInteractionSubsystem = true; - subsystem.SetInteractionSubsystemType(_targetOrderType); - - if (!gameObject.TryGetComponent(out var interactor)) - { - Debug.LogError($"[{GetType().Name}] IInteractor를 찾을 수 없습니다: {gameObject.name}"); - return; - } - - interactor.CanInteractTo(interactionComponent); - - _interactionSubsystem = subsystem; - } + _interactionSubsystem.SetInteractionSubsystemType(_targetOrderType); + _isGetInteractionSubsystem = true; } public override TaskStatus OnUpdate() diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index ed8485fa0..b1d747c7b 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f86abe14bf9fc4c7c93dfa96efd110ef0f56c3fb96a952c57e06a723fc87c352 +oid sha256:5d69f9ac4352f59df16943fd905dd7351328f295b2a8e4f74e8346f7bd4dc1bc size 1075 From fa2ebd45101318ac7b41b2a073349accd193cfe4 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 27 Aug 2025 11:23:43 +0900 Subject: [PATCH 11/12] =?UTF-8?q?=EB=A0=88=EC=8A=A4=ED=86=A0=EB=9E=91=20?= =?UTF-8?q?=EC=98=A4=EB=8D=94=20=EC=86=94=EB=B2=84=20=EC=BD=94=EB=A9=98?= =?UTF-8?q?=ED=8A=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AI/Customer/Actions/ContinueRestaurantOrder.cs | 7 +++++++ .../AI/Customer/Actions/ContinueRestaurantOrder.cs.meta | 3 +++ .../RestaurantOrders/RestaurantOrderSolver_Reserved.cs | 3 ++- .../Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs create mode 100644 Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs.meta diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs new file mode 100644 index 000000000..37397a54b --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs @@ -0,0 +1,7 @@ +namespace DDD +{ + public class ContinueRestaurantOrder + { + // 이미 있는 인터랙션 타겟을 대상으로 진행함 + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs.meta b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs.meta new file mode 100644 index 000000000..bf6373194 --- /dev/null +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/ContinueRestaurantOrder.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d0b954edf40f4172964dbd6e4fe22b1a +timeCreated: 1755772289 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs index c12a9ab2b..9e3709e4e 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Reserved.cs @@ -13,7 +13,8 @@ public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable in public bool CanExecuteInteractionSubsystem(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payloadSo = null) { - return true; + // Interactable's CurrentInteractor is me? => Can execute + return false; } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs index 14f6f77d9..acae8c6de 100644 --- a/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs +++ b/Assets/_DDD/_Scripts/RestaurantEvent/Solvers/RestaurantOrders/RestaurantOrderSolver_Wait.cs @@ -7,6 +7,10 @@ public class RestaurantOrderSolver_Wait : MonoBehaviour, IInteractionSubsystemSo public bool ExecuteInteractionSubsystem(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null) { // TODO : DO SOMETHING!!! + /* TODO + * OnInteracted에서 상태를 바꾸는 대신, 여기서 직접 바꿔주고, 현재 나에게 점유되어 있다는 사실을 알려주기? 그리고 CanInteractTo에서 이게 일치해야만 참 반환하게? + * 필요하다면 IInteractable 인터페이스에 CurrentInteractor를 등록하는 메소드를 추가해야 할수도? + */ return true; } From b0eb18f9c0baaeec9ff26996a2bcd64d9f1cb8aa Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Wed, 27 Aug 2025 11:44:51 +0900 Subject: [PATCH 12/12] Added todo comment --- .../AI/Customer/Actions/StartRestaurantOrder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs index 7fa600a90..bf6f0544b 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/AI/Customer/Actions/StartRestaurantOrder.cs @@ -40,7 +40,8 @@ public override TaskStatus OnUpdate() { return TaskStatus.Failure; } - + + // TODO : 이벤트 통해서 인터랙션. 직접 호출하지 말 것! var interacted = outInteractable.OnInteracted(_interactor); if (!interacted) {