diff --git a/Assets/07_Data/Communication/DialogGraph/fishhook.meta b/Assets/07_Data/Communication/DialogGraph/fishhook.meta new file mode 100644 index 00000000..0a4c8577 --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/fishhook.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 63da302d6cdd1e14da968a2898e6a9a5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_Area1.wdg b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_Area1.wdg new file mode 100644 index 00000000..aa384de4 --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_Area1.wdg @@ -0,0 +1,408 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 790b4d75d92f4b0984310a268dbd952f, type: 3} + m_Name: Fairy_fishRoom_Area1 + m_EditorClassIdentifier: Unity.GraphToolkit.Editor::Unity.GraphToolkit.Editor.Implementation.GraphObjectImp + m_GraphModel: + rid: 6595524353106116630 + references: + version: 2 + RefIds: + - rid: -2 + type: {class: , ns: , asm: } + - rid: 1414123175413022855 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 897520841189697386 + m_Value1: 6607104733771082257 + m_HashGuid: + serializedVersion: 2 + Hash: 6a279f2573a2740c112a3adabf26b15b + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_UniqueId: Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524353106116630 + type: {class: GraphModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 13819889836145151562 + m_Value1: 2645381255326452780 + m_HashGuid: + serializedVersion: 2 + Hash: 4a8e76c6951ccabf2ccc35633c48b624 + m_Name: Fairy_fishRoom_Area1 + m_GraphNodeModels: + - rid: 6595524353106116633 + - rid: 6595524353106116635 + - rid: 6595524353106116646 + m_GraphWireModels: + - rid: 6595524353106116636 + - rid: 1414123175413022855 + m_GraphStickyNoteModels: [] + m_GraphPlacematModels: [] + m_GraphVariableModels: [] + m_GraphPortalModels: [] + m_SectionModels: + - rid: 6595524353106116631 + m_LocalSubgraphs: [] + m_LastKnownBounds: + serializedVersion: 2 + x: 222 + y: 84 + width: 923 + height: 386 + m_GraphElementMetaData: + - m_Guid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_HashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_Category: 0 + m_Index: 0 + - m_Guid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_HashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_Category: 0 + m_Index: 1 + - m_Guid: + m_Value0: 5269650743910428719 + m_Value1: 257959026697812224 + m_HashGuid: + serializedVersion: 2 + Hash: 2f7027896e8f214900b9ed385e749403 + m_Category: 2 + m_Index: 0 + - m_Guid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_HashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_Category: 0 + m_Index: 2 + - m_Guid: + m_Value0: 897520841189697386 + m_Value1: 6607104733771082257 + m_HashGuid: + serializedVersion: 2 + Hash: 6a279f2573a2740c112a3adabf26b15b + m_Category: 2 + m_Index: 1 + m_EntryPoint: + rid: 6595524353106116633 + m_Graph: + rid: 6595524353106116632 + - rid: 6595524353106116631 + type: {class: SectionModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 13482299192089173763 + m_Value1: 8100932157345530803 + m_HashGuid: + serializedVersion: 2 + Hash: 03df02d4aebf1abbb3831e64e04a6c70 + m_Version: 2 + m_Items: [] + m_Title: + - rid: 6595524353106116632 + type: {class: DialogGraph, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116633 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_HashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_Version: 2 + m_Position: {x: 222.2174, y: 116.434784} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: [] + m_ValueList: [] + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116634 + - rid: 6595524353106116634 + type: {class: DialogStartNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116635 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_HashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_Version: 2 + m_Position: {x: 431.77588, y: 86.04323} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524353106116637 + - rid: 6595524353106116638 + - rid: 6595524353106116639 + - rid: 6595524353106116640 + - rid: 6595524353106116641 + - rid: 6595524353106116642 + - rid: 6595524353106116643 + - rid: 6595524353106116644 + - rid: 6595524374970761386 + - rid: 6595524374970761398 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116645 + - rid: 6595524353106116636 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 5269650743910428719 + m_Value1: 257959026697812224 + m_HashGuid: + serializedVersion: 2 + Hash: 2f7027896e8f214900b9ed385e749403 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_UniqueId: Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524353106116637 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116638 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524353106116639 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC774\uACF3\uC740 \uAE30\uBB18\uD55C \uB09A\uC2DC\uD130\uC57C." + - rid: 6595524353106116640 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116641 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116642 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116643 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524353106116644 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524353106116645 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116646 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_HashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_Version: 2 + m_Position: {x: 806, y: 84} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524353106116648 + - rid: 6595524353106116649 + - rid: 6595524353106116650 + - rid: 6595524353106116651 + - rid: 6595524353106116652 + - rid: 6595524353106116653 + - rid: 6595524353106116654 + - rid: 6595524353106116655 + - rid: 6595524374970761387 + - rid: 6595524374970761399 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116656 + - rid: 6595524353106116648 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116649 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524353106116650 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uAE30\uC5B5\uC758 \uC870\uAC01\uC744 \uB09A\uC544\uC57C\uD574." + - rid: 6595524353106116651 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116652 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116653 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116654 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524353106116655 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116656 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761386 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761387 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761398 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761399 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: diff --git a/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_Area1.wdg.meta b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_Area1.wdg.meta new file mode 100644 index 00000000..d1500a41 --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_Area1.wdg.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b44d9587db51ade41a11fc53f47dd1a7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 2ae5ca89bbed445479d9023586f0c041, type: 3} diff --git a/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_ClearArea.wdg b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_ClearArea.wdg new file mode 100644 index 00000000..a4a7531e --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_ClearArea.wdg @@ -0,0 +1,737 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 790b4d75d92f4b0984310a268dbd952f, type: 3} + m_Name: Fairy_fishRoom_ClearArea + m_EditorClassIdentifier: Unity.GraphToolkit.Editor::Unity.GraphToolkit.Editor.Implementation.GraphObjectImp + m_GraphModel: + rid: 6595524353106116630 + references: + version: 2 + RefIds: + - rid: -2 + type: {class: , ns: , asm: } + - rid: 6595524353106116630 + type: {class: GraphModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 13819889836145151562 + m_Value1: 2645381255326452780 + m_HashGuid: + serializedVersion: 2 + Hash: 4a8e76c6951ccabf2ccc35633c48b624 + m_Name: Fairy_fishRoom_ClearArea + m_GraphNodeModels: + - rid: 6595524353106116633 + - rid: 6595524353106116635 + - rid: 6595524353106116646 + - rid: 6595524374970761358 + - rid: 6595524374970761369 + m_GraphWireModels: + - rid: 6595524353106116636 + - rid: 6595524353106116647 + - rid: 6595524374970761359 + - rid: 6595524374970761370 + m_GraphStickyNoteModels: [] + m_GraphPlacematModels: [] + m_GraphVariableModels: [] + m_GraphPortalModels: [] + m_SectionModels: + - rid: 6595524353106116631 + m_LocalSubgraphs: [] + m_LastKnownBounds: + serializedVersion: 2 + x: 224 + y: -42 + width: 1430 + height: 883 + m_GraphElementMetaData: + - m_Guid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_HashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_Category: 0 + m_Index: 0 + - m_Guid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_HashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_Category: 0 + m_Index: 1 + - m_Guid: + m_Value0: 5269650743910428719 + m_Value1: 257959026697812224 + m_HashGuid: + serializedVersion: 2 + Hash: 2f7027896e8f214900b9ed385e749403 + m_Category: 2 + m_Index: 0 + - m_Guid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_HashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_Category: 0 + m_Index: 2 + - m_Guid: + m_Value0: 13678802302849805841 + m_Value1: 5869810211712229956 + m_HashGuid: + serializedVersion: 2 + Hash: 116e289638ded4bd446211b849c17551 + m_Category: 2 + m_Index: 1 + - m_Guid: + m_Value0: 6309969824669224220 + m_Value1: 11825358839457157206 + m_HashGuid: + serializedVersion: 2 + Hash: 1ccdd7b61f84915756905e07361d1ca4 + m_Category: 0 + m_Index: 3 + - m_Guid: + m_Value0: 3397748348636220684 + m_Value1: 10317322138978035326 + m_HashGuid: + serializedVersion: 2 + Hash: 0ccda1fc1e3a272f7e260f67d27d2e8f + m_Category: 2 + m_Index: 2 + - m_Guid: + m_Value0: 14492247198202050630 + m_Value1: 8595945445982712313 + m_HashGuid: + serializedVersion: 2 + Hash: 46b8fb250bce1ec9f9b16f00d7ee4a77 + m_Category: 0 + m_Index: 4 + - m_Guid: + m_Value0: 4733159566535984953 + m_Value1: 16169765346515963957 + m_HashGuid: + serializedVersion: 2 + Hash: 39879e648c8faf413550815ce98b66e0 + m_Category: 2 + m_Index: 3 + m_EntryPoint: + rid: 6595524353106116633 + m_Graph: + rid: 6595524353106116632 + - rid: 6595524353106116631 + type: {class: SectionModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 13482299192089173763 + m_Value1: 8100932157345530803 + m_HashGuid: + serializedVersion: 2 + Hash: 03df02d4aebf1abbb3831e64e04a6c70 + m_Version: 2 + m_Items: [] + m_Title: + - rid: 6595524353106116632 + type: {class: DialogGraph, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116633 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_HashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_Version: 2 + m_Position: {x: 224, y: 117} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: [] + m_ValueList: [] + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116634 + - rid: 6595524353106116634 + type: {class: DialogStartNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116635 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_HashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_Version: 2 + m_Position: {x: 433, y: 87} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524353106116637 + - rid: 6595524353106116638 + - rid: 6595524353106116639 + - rid: 6595524353106116640 + - rid: 6595524353106116641 + - rid: 6595524353106116642 + - rid: 6595524353106116643 + - rid: 6595524353106116644 + - rid: 6595524374970761380 + - rid: 6595524374970761406 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116645 + - rid: 6595524353106116636 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 5269650743910428719 + m_Value1: 257959026697812224 + m_HashGuid: + serializedVersion: 2 + Hash: 2f7027896e8f214900b9ed385e749403 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_UniqueId: Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524353106116637 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116638 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524353106116639 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uB2E4\uC74C \uACF5\uAC04\uC73C\uB85C \uAC08 \uC218 \uC788\uC5B4." + - rid: 6595524353106116640 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116641 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116642 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116643 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524353106116644 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524353106116645 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116646 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_HashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_Version: 2 + m_Position: {x: 808.30005, y: 85.15} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - ChoiceQuestion + - Choice0Text + - Choice1Text + - WaitForInput + - __option_EventKey + - Choice0Code + - Choice1Code + m_ValueList: + - rid: 6595524353106116648 + - rid: 6595524353106116649 + - rid: 6595524353106116650 + - rid: 6595524353106116651 + - rid: 6595524353106116652 + - rid: 6595524353106116653 + - rid: 6595524353106116654 + - rid: 6595524353106116655 + - rid: 6595524374970761341 + - rid: 6595524374970761342 + - rid: 6595524374970761343 + - rid: 6595524374970761381 + - rid: 6595524374970761407 + - rid: 6595524374970761412 + - rid: 6595524374970761413 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116656 + - rid: 6595524353106116647 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 13678802302849805841 + m_Value1: 5869810211712229956 + m_HashGuid: + serializedVersion: 2 + Hash: 116e289638ded4bd446211b849c17551 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_UniqueId: Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524353106116648 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 2 + - rid: 6595524353106116649 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524353106116650 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC5B4\uB290 \uACF5\uAC04\uC73C\uB85C \uC774\uB3D9\uD560\uB798?" + - rid: 6595524353106116651 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116652 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116653 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116654 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524353106116655 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116656 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761341 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: + - rid: 6595524374970761342 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: '{SpaceSceneName1}' + - rid: 6595524374970761343 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: '{SpaceSceneName2}' + - rid: 6595524374970761358 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 6309969824669224220 + m_Value1: 11825358839457157206 + m_HashGuid: + serializedVersion: 2 + Hash: 1ccdd7b61f84915756905e07361d1ca4 + m_Version: 2 + m_Position: {x: 1312.1732, y: -41.937325} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524374970761360 + - rid: 6595524374970761361 + - rid: 6595524374970761362 + - rid: 6595524374970761363 + - rid: 6595524374970761364 + - rid: 6595524374970761365 + - rid: 6595524374970761366 + - rid: 6595524374970761367 + - rid: 6595524374970761382 + - rid: 6595524374970761408 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524374970761368 + - rid: 6595524374970761359 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 3397748348636220684 + m_Value1: 10317322138978035326 + m_HashGuid: + serializedVersion: 2 + Hash: 0ccda1fc1e3a272f7e260f67d27d2e8f + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: Choice0Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: "Choice 1 \u2192" + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 6309969824669224220 + m_Value1: 11825358839457157206 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 1ccdd7b61f84915756905e07361d1ca4 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524374970761360 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761361 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524374970761362 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC88B\uC544! {SpaceSceneName1}\uB85C \uC774\uB3D9\uD558\uC790." + - rid: 6595524374970761363 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761364 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761365 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761366 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524374970761367 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761368 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761369 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 14492247198202050630 + m_Value1: 8595945445982712313 + m_HashGuid: + serializedVersion: 2 + Hash: 46b8fb250bce1ec9f9b16f00d7ee4a77 + m_Version: 2 + m_Position: {x: 1314.8867, y: 457.07712} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524374970761371 + - rid: 6595524374970761372 + - rid: 6595524374970761373 + - rid: 6595524374970761374 + - rid: 6595524374970761375 + - rid: 6595524374970761376 + - rid: 6595524374970761377 + - rid: 6595524374970761378 + - rid: 6595524374970761383 + - rid: 6595524374970761409 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524374970761379 + - rid: 6595524374970761370 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 4733159566535984953 + m_Value1: 16169765346515963957 + m_HashGuid: + serializedVersion: 2 + Hash: 39879e648c8faf413550815ce98b66e0 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: Choice1Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: "Choice 2 \u2192" + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 14492247198202050630 + m_Value1: 8595945445982712313 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 46b8fb250bce1ec9f9b16f00d7ee4a77 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524374970761371 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761372 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524374970761373 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC88B\uC544! {SpaceSceneName2}\uB85C \uC774\uB3D9\uD558\uC790." + - rid: 6595524374970761374 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761375 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761376 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761377 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524374970761378 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761379 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761380 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761381 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761382 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524374970761383 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524374970761406 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761407 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761408 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: OpenDoor1 + - rid: 6595524374970761409 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: OpenDoor2 + - rid: 6595524374970761412 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524374970761413 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 2 diff --git a/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_ClearArea.wdg.meta b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_ClearArea.wdg.meta new file mode 100644 index 00000000..978cf1ff --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/fishhook/Fairy_fishRoom_ClearArea.wdg.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e6f745d905312c14699dd74c40a28852 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 2ae5ca89bbed445479d9023586f0c041, type: 3} diff --git a/Assets/07_Data/Terrain/RoomOriginTerrain.asset b/Assets/07_Data/Terrain/RoomOriginTerrain.asset index 34896d06..e71d995f 100644 --- a/Assets/07_Data/Terrain/RoomOriginTerrain.asset +++ b/Assets/07_Data/Terrain/RoomOriginTerrain.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ca4eb2dd1ffa75a5c7f362c27bcfbc12a792c462a8eabe542ba439c0f14976b4 -size 5581228 +oid sha256:f3e11c49539aa72f350f9932e7d1825d43a6173aad4dc64e01b9c440af40d1ed +size 5582252 diff --git a/Assets/My project/Fishing Scripts/Prefabs/FishingSystemPrefab.prefab b/Assets/My project/Fishing Scripts/Prefabs/FishingSystemPrefab.prefab index caa8e5c5..7be143df 100644 --- a/Assets/My project/Fishing Scripts/Prefabs/FishingSystemPrefab.prefab +++ b/Assets/My project/Fishing Scripts/Prefabs/FishingSystemPrefab.prefab @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56c8b7a1d030d16e34a454b3fa08469d16f67e2946a8c9314878f11488b9b27c -size 154142 +oid sha256:64239652fbbd1b648441a25bbc7adae5c75781bab7b25c4133c73dd6fd9a6b28 +size 220519 diff --git a/Assets/My project/Fishing Scripts/Prefabs/fish.fbx b/Assets/My project/Fishing Scripts/Prefabs/fish.fbx new file mode 100644 index 00000000..8853a813 --- /dev/null +++ b/Assets/My project/Fishing Scripts/Prefabs/fish.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d4c0bb2fe2203ded9ddf86d9fda8dec577c3e512b476bff641e9a8a5835b56d +size 30108 diff --git a/Assets/My project/Fishing Scripts/Prefabs/fish.fbx.meta b/Assets/My project/Fishing Scripts/Prefabs/fish.fbx.meta new file mode 100644 index 00000000..8d6e16ba --- /dev/null +++ b/Assets/My project/Fishing Scripts/Prefabs/fish.fbx.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 3f6af38d640059d49af824ba9ba06e73 +ModelImporter: + serializedVersion: 24200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + generateMeshLods: 0 + meshLodGenerationFlags: 0 + maximumMeshLod: -1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/My project/Fishing Scripts/UI/FishingGameManager.cs b/Assets/My project/Fishing Scripts/UI/FishingGameManager.cs index 3bb6daba..45084c9b 100644 --- a/Assets/My project/Fishing Scripts/UI/FishingGameManager.cs +++ b/Assets/My project/Fishing Scripts/UI/FishingGameManager.cs @@ -12,6 +12,12 @@ public enum ResultType Miss } + public enum FishingControlMode + { + TimingGauge, + SimpleReel + } + [Header("Auto Bind")] [Tooltip("현재 만든 Prefab 구조 기준으로 비어 있는 참조를 자동 연결합니다.")] [SerializeField] private bool autoBindMissingReferences = true; @@ -25,6 +31,28 @@ public enum ResultType [SerializeField] private FishingHapticManager haptic; [SerializeField] private RotateUI centerIconRotate; + [Header("Simple Reel Fishing")] + [Tooltip("TimingGauge는 기존 원형 타이밍 게이지 방식, SimpleReel은 릴을 감아 줄 길이를 줄이면 성공하는 방식입니다.")] + [SerializeField] private FishingControlMode fishingControlMode = FishingControlMode.SimpleReel; + + [Tooltip("낚싯대 / 찌 / 릴 제어 스크립트입니다. SimpleReel 모드에서 줄 길이를 읽습니다.")] + [SerializeField] private FishingRodVRController rodController; + + [Tooltip("현재 줄 길이가 이 값 이하가 되면 낚기 성공으로 처리합니다.")] + [SerializeField] private float catchCompleteLineLength = 0.7f; + + [Tooltip("릴 낚시 시작 시 줄 길이가 성공 길이보다 너무 짧으면 이 거리만큼 최소 시작 길이를 보정합니다.")] + [SerializeField] private float simpleReelMinimumPullDistance = 0.35f; + + [Tooltip("릴 낚기 성공 후 찌를 낚싯대 쪽 대기 위치로 회수합니다.")] + [SerializeField] private bool returnBobberAfterSimpleReelCatch = true; + + [Tooltip("SimpleReel 모드에서 기존 타이밍 게이지 UI를 숨기고 진행도/줄 길이 중심으로 표시합니다.")] + [SerializeField] private bool hideTimingGaugeInSimpleReelMode = true; + + [Tooltip("SimpleReel 모드에서는 StartFishing이 여러 번 호출됩니다. 켜면 첫 시작 때만 연못 상태를 초기화합니다.")] + [SerializeField] private bool resetPondOnlyOnFirstSimpleReelStart = true; + [Header("XR Controller Input")] [Tooltip("낚시 판정을 실행할 컨트롤러 입력입니다. 예: XRI Right Interaction / Select")] [SerializeField] private InputActionReference submitAction; @@ -65,6 +93,9 @@ public enum ResultType [Tooltip("StartFishing을 호출할 때 쓰레기 수거/연못 상태를 초기화합니다.")] [SerializeField] private bool resetPondStateOnStart = true; + [Tooltip("낚시 세션이 진행 중일 때 StartFishing이 중복 호출되는 것을 막습니다.")] + [SerializeField] private bool preventRestartWhileSessionRunning = true; + [Header("Round Settings")] [SerializeField] private float nextRoundDelay = 0.35f; [SerializeField] private float nextCatchDelay = 2.0f; @@ -95,9 +126,15 @@ public enum ResultType private bool clockwise = true; private bool activeGame; private bool inputLocked; + private bool fishingSessionRunning; private bool pondCleaned; private bool memoryPieceCollected; + private bool simpleReelCatchActive; + private bool simpleReelPondInitialized; + private float simpleReelStartLineLength; + private float simpleReelProgress; + private bool submitActionWasEnabled; private bool resetActionWasEnabled; @@ -106,6 +143,7 @@ public enum ResultType private Coroutine finalResultRoutine; public bool IsActiveGame => activeGame; + public bool IsFishingSessionRunning => fishingSessionRunning; public bool IsPondCleaned => pondCleaned; public bool IsMemoryPieceCollected => memoryPieceCollected; public int SuccessCount => successCount; @@ -117,6 +155,9 @@ public enum ResultType public int SessionTrashCount => sessionTrashCount; public int SessionMemoryPieceCount => sessionMemoryPieceCount; public int SessionCompassCount => sessionCompassCount; + public FishingControlMode ControlMode => fishingControlMode; + public bool IsSimpleReelCatchActive => simpleReelCatchActive; + public float SimpleReelProgress => simpleReelProgress; public event Action ItemCaught; @@ -154,6 +195,12 @@ private void Update() if (!activeGame) return; + if (fishingControlMode == FishingControlMode.SimpleReel) + { + UpdateSimpleReelCatch(); + return; + } + if (inputLocked) return; @@ -188,6 +235,9 @@ public void AutoBindMissingReferences() if (haptic == null) haptic = searchRoot != null ? searchRoot.GetComponentInChildren(true) : GetComponentInChildren(true); + if (rodController == null) + rodController = searchRoot != null ? searchRoot.GetComponentInChildren(true) : GetComponentInChildren(true); + if (centerIconRotate == null) { Transform centerIconTransform = FindTransformRecursive(searchRoot, "CenterIcon"); @@ -276,6 +326,8 @@ private void ValidateRuntimeSettings() nextRoundDelay = Mathf.Max(0f, nextRoundDelay); nextCatchDelay = Mathf.Max(0f, nextCatchDelay); finalResultShowTime = Mathf.Max(0f, finalResultShowTime); + catchCompleteLineLength = Mathf.Max(0.05f, catchCompleteLineLength); + simpleReelMinimumPullDistance = Mathf.Max(0.01f, simpleReelMinimumPullDistance); pointerAngle = Normalize(pointerAngle); zoneCenter = Normalize(zoneCenter); @@ -293,6 +345,8 @@ private void InitializeIdleUI() ui.UpdateInventoryUI(sessionFishCount, sessionTrashCount, sessionMemoryPieceCount, sessionCompassCount); ui.SetPointerRotation(0f); ui.SetZone(0f, startZoneSize); + ui.SetSimpleReelUIVisible(false); + ui.SetTimingGaugeVisible(fishingControlMode == FishingControlMode.TimingGauge); } if (centerIconRotate != null) @@ -300,23 +354,50 @@ private void InitializeIdleUI() } public void StartFishing() + { + StartFishing(false); + } + + public void StartFishing(bool forceRestart) { ValidateRuntimeSettings(); + + if (preventRestartWhileSessionRunning && fishingSessionRunning && !forceRestart) + { + if (showDebugLog) + Debug.Log("낚시 세션이 이미 진행 중이라 StartFishing 호출을 무시했습니다."); + return; + } + StopRunningRoutines(); if (uiRoot != null) uiRoot.SetActive(true); - if (resetPondStateOnStart) + bool shouldResetPondState = forceRestart || resetPondStateOnStart; + + if (fishingControlMode == FishingControlMode.SimpleReel && resetPondOnlyOnFirstSimpleReelStart) + shouldResetPondState = forceRestart || (resetPondStateOnStart && !simpleReelPondInitialized); + + if (shouldResetPondState) + { ResetPondState(); + if (fishingControlMode == FishingControlMode.SimpleReel) + simpleReelPondInitialized = true; + } + + fishingSessionRunning = true; if (ui != null) ui.InitializeFishingUI(); - StartNewCatchAttempt(); + if (fishingControlMode == FishingControlMode.SimpleReel) + StartSimpleReelCatch(); + else + StartNewCatchAttempt(); if (showDebugLog) - Debug.Log("기묘한 낚시터 시작"); + Debug.Log(fishingControlMode == FishingControlMode.SimpleReel ? "릴 감기 낚시 시작" : "기묘한 낚시터 시작"); } public void StopFishing(bool hideUI = false) @@ -325,6 +406,8 @@ public void StopFishing(bool hideUI = false) activeGame = false; inputLocked = true; + fishingSessionRunning = false; + simpleReelCatchActive = false; if (centerIconRotate != null) centerIconRotate.StopRotate(); @@ -335,7 +418,10 @@ public void StopFishing(bool hideUI = false) public void ResetFishing() { - StartFishing(); + fishingSessionRunning = false; + simpleReelCatchActive = false; + simpleReelPondInitialized = false; + StartFishing(true); } public void ResetPondState() @@ -350,6 +436,82 @@ public void ResetPondState() sessionCompassCount = 0; pondCleaned = false; memoryPieceCollected = false; + simpleReelCatchActive = false; + simpleReelProgress = 0f; + simpleReelStartLineLength = 0f; + } + + private void StartSimpleReelCatch() + { + if (rodController == null && autoBindMissingReferences) + AutoBindMissingReferences(); + + if (rodController == null) + { + Debug.LogWarning("[FishingGameManager] SimpleReel 모드에는 FishingRodVRController 참조가 필요합니다.", this); + activeGame = false; + inputLocked = true; + fishingSessionRunning = false; + return; + } + + successCount = 0; + failCount = 0; + inputLocked = false; + activeGame = true; + simpleReelCatchActive = true; + + float currentLineLength = Mathf.Max(rodController.CurrentLineLength, catchCompleteLineLength + simpleReelMinimumPullDistance); + simpleReelStartLineLength = currentLineLength; + simpleReelProgress = 0f; + + if (centerIconRotate != null) + { + centerIconRotate.ResetRotation(); + centerIconRotate.StopRotate(); + } + + if (ui != null) + { + ui.SetSimpleReelUIVisible(true); + if (hideTimingGaugeInSimpleReelMode) + ui.SetTimingGaugeVisible(false); + ui.UpdateSimpleReelUI(simpleReelProgress, rodController.CurrentLineLength, rodController.IsReeling); + ui.ShowPersistentResult("릴을 감아 끌어올려라!"); + } + + UpdateUI(); + } + + private void UpdateSimpleReelCatch() + { + if (!simpleReelCatchActive || rodController == null) + return; + + float currentLineLength = rodController.CurrentLineLength; + float totalPullDistance = Mathf.Max(0.001f, simpleReelStartLineLength - catchCompleteLineLength); + float pulledDistance = simpleReelStartLineLength - currentLineLength; + simpleReelProgress = Mathf.Clamp01(pulledDistance / totalPullDistance); + + if (ui != null) + ui.UpdateSimpleReelUI(simpleReelProgress, currentLineLength, rodController.IsReeling); + + if (currentLineLength <= catchCompleteLineLength || simpleReelProgress >= 1f) + { + simpleReelCatchActive = false; + inputLocked = true; + + if (haptic != null) + haptic.Perfect(); + + if (ui != null) + { + ui.UpdateSimpleReelUI(1f, currentLineLength, false); + ui.ShowPersistentResult("낚았다!"); + } + + CatchItemSuccess(); + } } private void StartNewCatchAttempt() @@ -366,7 +528,8 @@ private void StartNewCatchAttempt() zoneSize = startZoneSize; } - clockwise = UnityEngine.Random.value > 0.5f; + if (randomDirectionEachRound) + clockwise = UnityEngine.Random.value > 0.5f; if (centerIconRotate != null) { @@ -412,6 +575,9 @@ private void RotatePointer() public void SubmitAttempt() { + if (fishingControlMode == FishingControlMode.SimpleReel) + return; + if (!activeGame) return; @@ -622,6 +788,17 @@ private void ApplyCatchResult(FishingRewardSystem.CatchResult catchResult) return; } + if (fishingControlMode == FishingControlMode.SimpleReel) + { + fishingSessionRunning = false; + simpleReelCatchActive = false; + + if (returnBobberAfterSimpleReelCatch && rodController != null) + rodController.ReturnBobberToRest(); + + return; + } + nextCatchRoutine = StartCoroutine(NextCatchRoutine()); } @@ -680,6 +857,23 @@ private void UpdateUI() if (ui == null) return; + if (fishingControlMode == FishingControlMode.SimpleReel) + { + ui.SetSimpleReelUIVisible(activeGame || simpleReelCatchActive); + if (hideTimingGaugeInSimpleReelMode) + ui.SetTimingGaugeVisible(false); + + ui.UpdateFishingProgress(cleanupItemCount, requiredCleanupItems, pondCleaned, memoryPieceCollected, totalCaughtItems); + ui.UpdateInventoryUI(sessionFishCount, sessionTrashCount, sessionMemoryPieceCount, sessionCompassCount); + + float currentLineLength = rodController != null ? rodController.CurrentLineLength : 0f; + bool isReeling = rodController != null && rodController.IsReeling; + ui.UpdateSimpleReelUI(simpleReelProgress, currentLineLength, isReeling); + return; + } + + ui.SetSimpleReelUIVisible(false); + ui.SetTimingGaugeVisible(true); ui.SetZone(zoneCenter, zoneSize); ui.UpdateCounter(successCount, requiredSuccesses, failCount, allowedFails); ui.UpdateFishingProgress(cleanupItemCount, requiredCleanupItems, pondCleaned, memoryPieceCollected, totalCaughtItems); @@ -690,6 +884,8 @@ private void FishingSuccess() { activeGame = false; inputLocked = true; + fishingSessionRunning = false; + simpleReelCatchActive = false; if (centerIconRotate != null) centerIconRotate.StopRotate(); @@ -709,6 +905,8 @@ private void FishingFail() { activeGame = false; inputLocked = true; + fishingSessionRunning = false; + simpleReelCatchActive = false; if (centerIconRotate != null) centerIconRotate.StopRotate(); diff --git a/Assets/My project/Fishing Scripts/UI/FishingGaugeUI.cs b/Assets/My project/Fishing Scripts/UI/FishingGaugeUI.cs index 1358d03b..ed67dfa5 100644 --- a/Assets/My project/Fishing Scripts/UI/FishingGaugeUI.cs +++ b/Assets/My project/Fishing Scripts/UI/FishingGaugeUI.cs @@ -49,6 +49,20 @@ public class FishingGaugeUI : MonoBehaviour [Tooltip("SuccessZone. Image Type = Filled, Fill Method = Radial 360")] [SerializeField] private Image successZone; + [Header("Simple Reel UI")] + [Tooltip("릴 감기 진행도 게이지 루트입니다. 없으면 텍스트만 업데이트됩니다.")] + [SerializeField] private GameObject reelProgressGaugeRoot; + + [Tooltip("릴 감기 진행도 Fill Image입니다. Image Type = Filled / Horizontal / Left 추천.")] + [SerializeField] private Image reelProgressGaugeFill; + + [Tooltip("현재 줄 길이를 보여줄 텍스트입니다. CounterPanel 안에 LineLengthText를 추가해서 연결하세요.")] + [SerializeField] private TMP_Text lineLengthText; + + [SerializeField] private string simpleReelObjectiveText = "릴을 감아 끌어올려라"; + [SerializeField] private string simpleReelIdleText = "릴 손잡이를 잡고 돌려라"; + [SerializeField] private string simpleReelReelingText = "좋다, 계속 감아라!"; + [Header("Round Result UI")] [SerializeField] private TMP_Text resultText; @@ -134,6 +148,9 @@ public class FishingGaugeUI : MonoBehaviour [Tooltip("게임 클리어/실패 최종 결과가 뜰 때 진행 UI를 전부 숨기고 FinalResultPanel만 보이게 합니다.")] [SerializeField] private bool showOnlyFinalResult = true; + [Tooltip("FinalResultPanel을 숨길 때 진행 UI를 다시 켤지 결정합니다. 클리어 후 UI를 완전히 닫는 구조면 Off로 두세요.")] + [SerializeField] private bool restoreGameplayUIAfterFinalResult = true; + [Tooltip("BackgroundPanel. 최종 결과창만 보이고 싶으면 자동 연결하거나 직접 연결하세요.")] [SerializeField] private GameObject gameplayBackgroundRoot; @@ -267,6 +284,9 @@ public void AutoBindMissingReferences() if (gaugeGroupRect == null) gaugeGroupRect = FindComponentByName("GaugeGroup"); if (pointerPivot == null) pointerPivot = FindComponentByName("PointerPivot"); if (successZone == null) successZone = FindComponentByName("SuccessZone"); + if (reelProgressGaugeRoot == null) reelProgressGaugeRoot = FindGameObject("ReelProgressGauge", "ReelProgressGroup", "ReelFightProgressGauge"); + if (reelProgressGaugeFill == null) reelProgressGaugeFill = FindComponentByName("ReelProgressGaugeFill", "ReelProgressFill", "ReelFightProgressFill"); + if (lineLengthText == null) lineLengthText = FindComponentByName("LineLengthText", "Line Length Text", "LineText"); if (resultText == null) resultText = FindComponentByName("ResultText"); if (itemIcon == null) itemIcon = FindComponentByName("ItemIcon"); @@ -327,6 +347,7 @@ public void InitializeFishingUI() UpdateInventoryUI(0, 0, 0, 0); lastCleanupFill = -1f; SetCleanupFill(0f, true); + SetSimpleReelUIVisible(false); initialized = true; } @@ -390,6 +411,55 @@ public void UpdateCounter(int success, int successTarget, int fail, int failTarg failText.text = $"실패 {fail}/{failTarget}"; } + public void SetTimingGaugeVisible(bool visible) + { + if (gaugeGroupRoot != null) + gaugeGroupRoot.SetActive(visible); + else if (gaugeGroupRect != null) + gaugeGroupRect.gameObject.SetActive(visible); + } + + public void SetSimpleReelUIVisible(bool visible) + { + if (reelProgressGaugeRoot != null) + reelProgressGaugeRoot.SetActive(visible); + } + + public void UpdateSimpleReelUI(float progress, float lineLength, bool isReeling) + { + ShowCounter(); + + progress = Mathf.Clamp01(progress); + lineLength = Mathf.Max(0f, lineLength); + int progressPercent = Mathf.RoundToInt(progress * 100f); + + if (catchCountText != null) + catchCountText.text = $"끌어올리기 {progressPercent}%"; + + if (successText != null && successText != catchCountText) + successText.text = $"끌어올리기 {progressPercent}%"; + + if (failText != null) + failText.text = $"줄 길이 {lineLength:0.0}m"; + + if (lineLengthText != null) + lineLengthText.text = $"줄 길이 {lineLength:0.0}m"; + + if (reelProgressGaugeFill != null) + reelProgressGaugeFill.fillAmount = progress; + + if (objectiveText != null && !string.IsNullOrWhiteSpace(simpleReelObjectiveText)) + objectiveText.text = simpleReelObjectiveText; + + if (resultText != null && resultText.gameObject.activeSelf) + { + if (isReeling && progress < 1f) + resultText.text = simpleReelReelingText; + else if (progress < 1f && !string.IsNullOrWhiteSpace(simpleReelIdleText)) + resultText.text = simpleReelIdleText; + } + } + public void UpdateFishingProgress(int cleanupItemCount, int cleanupTarget, bool pondCleaned, bool memoryPieceCollected, int totalCaughtItems) { cleanupTarget = Mathf.Max(1, cleanupTarget); @@ -622,6 +692,30 @@ public void ShowResult(string text, Color color) resultRoutine = StartCoroutine(ResultRoutine(text, color)); } + public void ShowPersistentResult(string text) + { + ShowPersistentResult(text, defaultResultColor); + } + + public void ShowPersistentResult(string text, Color color) + { + if (resultText == null) + return; + + if (resultRoutine != null) + { + StopCoroutine(resultRoutine); + resultRoutine = null; + } + + resultText.gameObject.SetActive(true); + resultText.color = color; + resultText.text = text; + + if (effects != null) + effects.Pop(resultText.transform, resultPopScale, resultPopTime); + } + public void ShowResultForType(FishingGameManager.ResultType resultType) { switch (resultType) @@ -922,7 +1016,11 @@ private void HideNotice(bool instant) memoryPieceNoticePanel.SetActive(false); if (memoryPieceNoticeCanvasGroup != null) + { memoryPieceNoticeCanvasGroup.alpha = 0f; + memoryPieceNoticeCanvasGroup.interactable = false; + memoryPieceNoticeCanvasGroup.blocksRaycasts = false; + } } else { @@ -946,14 +1044,20 @@ public void SetControllerGuideVisible(bool visible) private void SetControllerGuideVisible(bool visible, bool instant) { if (effects != null && !instant) + { effects.FadeCanvasGroup(controllerGuidePanel, controllerGuideCanvasGroup, visible, panelFadeTime); + } else { if (controllerGuidePanel != null) controllerGuidePanel.SetActive(visible); if (controllerGuideCanvasGroup != null) + { controllerGuideCanvasGroup.alpha = visible ? 1f : 0f; + controllerGuideCanvasGroup.interactable = visible; + controllerGuideCanvasGroup.blocksRaycasts = visible; + } } } @@ -1034,6 +1138,9 @@ private void SetGameplayUIVisible(bool visible) SetGameObjectVisible(itemSlotPanel, visible); SetGameObjectVisible(cleanupGaugeRoot, visible); + if (!visible) + SetSimpleReelUIVisible(false); + if (gaugeGroupRoot != null) gaugeGroupRoot.SetActive(visible); else if (gaugeGroupRect != null) @@ -1142,9 +1249,14 @@ private void HideFinalResult(bool showCounterAfterHide, bool instant) if (showCounterAfterHide) { if (showOnlyFinalResult) - SetGameplayUIVisible(true); + { + if (restoreGameplayUIAfterFinalResult) + SetGameplayUIVisible(true); + } else + { ShowCounter(); + } } } diff --git a/Assets/My project/Fishing Scripts/UI/FishingModelLineFollower.cs b/Assets/My project/Fishing Scripts/UI/FishingModelLineFollower.cs deleted file mode 100644 index 87868294..00000000 --- a/Assets/My project/Fishing Scripts/UI/FishingModelLineFollower.cs +++ /dev/null @@ -1,350 +0,0 @@ -using UnityEngine; - -/// -/// 모델 낚시줄을 두 포인트 사이에 맞춰 배치/회전/길이 스케일하는 스크립트입니다. -/// 권장 사용 방식: -/// - StretchLineRoot 빈 오브젝트에 이 스크립트를 붙입니다. -/// - StretchLineRoot 자식으로 '늘어나는 중간 줄 모델'만 넣습니다. -/// - RodFixedLinePart, BobberFixedLinePart, Bobber/Hook은 StretchLineRoot 안에 넣지 않습니다. -/// - 낚시찌는 BobberLineStartPoint의 자식으로 넣어 줄 끝점에 고정합니다. -/// -public class FishingModelLineFollower : MonoBehaviour -{ - public enum LineUseMode - { - WholeModelLine, - StretchSegmentOnly - } - - public enum LineAxis - { - LocalX, - LocalY, - LocalZ - } - - public enum PivotMode - { - Center, - Start, - End - } - - [Header("Mode")] - [Tooltip("WholeModelLine: 전체 줄 모델을 두 포인트 사이에 맞춤 / StretchSegmentOnly: 분리된 중간 줄 조각만 늘리는 권장 모드")] - [SerializeField] private LineUseMode lineUseMode = LineUseMode.StretchSegmentOnly; - - [Header("Line Targets")] - [Tooltip("늘어나는 줄의 시작점입니다. StretchSegmentOnly에서는 RodLineEndPoint를 연결하세요.")] - [SerializeField] private Transform rodTipPoint; - - [Tooltip("늘어나는 줄의 끝점입니다. StretchSegmentOnly에서는 BobberLineStartPoint를 연결하세요.")] - [SerializeField] private Transform bobberPoint; - - [Header("Stretch Settings")] - [Tooltip("모델 줄의 길이 방향 축입니다. 보통 LocalY부터 테스트하세요.")] - [SerializeField] private LineAxis lineAxis = LineAxis.LocalY; - - [Tooltip("모델 줄의 원본 길이입니다. 줄이 너무 길게 늘어나면 값을 키우고, 너무 짧으면 값을 줄이세요.")] - [Min(0.0001f)] - [SerializeField] private float originalLength = 1f; - - [Tooltip("두 포인트가 너무 가까울 때 사용할 최소 길이입니다.")] - [Min(0.0001f)] - [SerializeField] private float minLength = 0.03f; - - [Tooltip("줄 두께 배율입니다. 1이면 원본 두께를 유지합니다.")] - [Min(0.0001f)] - [SerializeField] private float thicknessScale = 1f; - - [Tooltip("모델 줄의 앞뒤 방향이 거꾸로 보일 때 켜세요. 포인트 연결은 바꾸지 않는 것을 추천합니다.")] - [SerializeField] private bool reverseVisualDirection; - - [Tooltip("대부분 Center를 권장합니다. 모델 Pivot이 시작점/끝점에 있으면 Start 또는 End를 테스트하세요.")] - [SerializeField] private PivotMode pivotMode = PivotMode.Center; - - [Header("Visual Mesh Correction")] - [Tooltip("실제 Mesh 자식입니다. 비워두면 첫 번째 Renderer가 있는 자식을 자동으로 찾습니다. 위치 보정은 Root가 아니라 이 Visual에 적용하세요.")] - [SerializeField] private Transform visualRoot; - - [Tooltip("Visual Mesh의 로컬 위치 보정값입니다. 줄이 살짝 위/옆으로 떠 있을 때 작은 값으로만 보정하세요.")] - [SerializeField] private Vector3 visualLocalPositionOffset; - - [Tooltip("Visual Mesh의 로컬 회전 보정값입니다. 모델 자체가 90도 틀어져 있을 때 사용하세요.")] - [SerializeField] private Vector3 visualLocalRotationOffsetEuler; - - [Header("Root Rotation Correction")] - [Tooltip("루트 회전 보정값입니다. 가능하면 0,0,0으로 두고 Line Axis / Reverse Visual Direction / Visual Rotation Offset으로 먼저 맞추세요.")] - [SerializeField] private Vector3 rootRotationOffsetEuler; - - [Header("Visibility / Update")] - [SerializeField] private bool hideWhenMissingTarget = true; - [SerializeField] private bool hideWhenTooShort = false; - [SerializeField] private bool updateInLateUpdate = true; - - [Header("Debug")] - [SerializeField] private bool drawDebugLine = true; - [SerializeField] private Color debugLineColor = Color.cyan; - - private Vector3 initialLocalScale = Vector3.one; - private Vector3 visualInitialLocalPosition; - private Quaternion visualInitialLocalRotation = Quaternion.identity; - private bool initialized; - - public LineUseMode CurrentLineUseMode => lineUseMode; - public Transform RodTipPoint => rodTipPoint; - public Transform BobberPoint => bobberPoint; - - private void Awake() - { - InitializeIfNeeded(); - } - - private void Reset() - { - lineUseMode = LineUseMode.StretchSegmentOnly; - lineAxis = LineAxis.LocalY; - originalLength = 1f; - minLength = 0.03f; - thicknessScale = 1f; - pivotMode = PivotMode.Center; - updateInLateUpdate = true; - drawDebugLine = true; - TryAutoFindVisualRoot(); - } - - private void Update() - { - if (!updateInLateUpdate) - UpdateLine(); - } - - private void LateUpdate() - { - if (updateInLateUpdate) - UpdateLine(); - } - - private void OnValidate() - { - originalLength = Mathf.Max(0.0001f, originalLength); - minLength = Mathf.Max(0.0001f, minLength); - thicknessScale = Mathf.Max(0.0001f, thicknessScale); - - if (!Application.isPlaying) - TryAutoFindVisualRoot(); - } - - private void InitializeIfNeeded() - { - if (initialized) - return; - - initialLocalScale = transform.localScale; - - if (visualRoot == null) - TryAutoFindVisualRoot(); - - if (visualRoot != null) - { - visualInitialLocalPosition = visualRoot.localPosition; - visualInitialLocalRotation = visualRoot.localRotation; - } - - initialized = true; - } - - private void UpdateLine() - { - InitializeIfNeeded(); - - if (rodTipPoint == null || bobberPoint == null) - { - SetVisible(!hideWhenMissingTarget); - return; - } - - Vector3 start = rodTipPoint.position; - Vector3 end = bobberPoint.position; - Vector3 segment = end - start; - float distance = segment.magnitude; - - if (distance < minLength) - { - if (hideWhenTooShort) - { - SetVisible(false); - return; - } - - distance = minLength; - } - - Vector3 direction = segment.sqrMagnitude > 0.000001f ? segment.normalized : transform.forward; - Vector3 visualDirection = reverseVisualDirection ? -direction : direction; - - SetVisible(true); - - transform.position = GetRootPosition(start, end); - transform.rotation = Quaternion.FromToRotation(GetAxisVector(lineAxis), visualDirection) * Quaternion.Euler(rootRotationOffsetEuler); - transform.localScale = GetScaledVector(distance); - - ApplyVisualCorrection(); - - if (drawDebugLine) - Debug.DrawLine(start, end, debugLineColor); - } - - private Vector3 GetRootPosition(Vector3 start, Vector3 end) - { - switch (pivotMode) - { - case PivotMode.Start: - return start; - case PivotMode.End: - return end; - case PivotMode.Center: - default: - return (start + end) * 0.5f; - } - } - - private Vector3 GetScaledVector(float targetLength) - { - float lengthScale = targetLength / Mathf.Max(0.0001f, originalLength); - - Vector3 scale = initialLocalScale; - - switch (lineAxis) - { - case LineAxis.LocalX: - scale.x = initialLocalScale.x * lengthScale; - scale.y = initialLocalScale.y * thicknessScale; - scale.z = initialLocalScale.z * thicknessScale; - break; - - case LineAxis.LocalY: - scale.x = initialLocalScale.x * thicknessScale; - scale.y = initialLocalScale.y * lengthScale; - scale.z = initialLocalScale.z * thicknessScale; - break; - - case LineAxis.LocalZ: - scale.x = initialLocalScale.x * thicknessScale; - scale.y = initialLocalScale.y * thicknessScale; - scale.z = initialLocalScale.z * lengthScale; - break; - } - - return scale; - } - - private static Vector3 GetAxisVector(LineAxis axis) - { - switch (axis) - { - case LineAxis.LocalX: - return Vector3.right; - case LineAxis.LocalY: - return Vector3.up; - case LineAxis.LocalZ: - return Vector3.forward; - default: - return Vector3.up; - } - } - - private void ApplyVisualCorrection() - { - if (visualRoot == null) - return; - - visualRoot.localPosition = visualInitialLocalPosition + visualLocalPositionOffset; - visualRoot.localRotation = visualInitialLocalRotation * Quaternion.Euler(visualLocalRotationOffsetEuler); - } - - private void SetVisible(bool visible) - { - if (visualRoot != null) - { - SetRenderersVisible(visualRoot, visible); - return; - } - - SetRenderersVisible(transform, visible); - } - - private void SetRenderersVisible(Transform target, bool visible) - { - if (target == null) - return; - - Renderer[] renderers = target.GetComponentsInChildren(true); - for (int i = 0; i < renderers.Length; i++) - renderers[i].enabled = visible; - } - - private void TryAutoFindVisualRoot() - { - if (visualRoot != null) - return; - - Renderer directRenderer = GetComponent(); - if (directRenderer != null) - { - visualRoot = transform; - return; - } - - Renderer childRenderer = GetComponentInChildren(true); - if (childRenderer != null) - visualRoot = childRenderer.transform; - } - - [ContextMenu("Set Mode: Stretch Segment Only")] - private void SetStretchSegmentOnlyMode() - { - lineUseMode = LineUseMode.StretchSegmentOnly; - } - - [ContextMenu("Reset Corrections")] - private void ResetCorrections() - { - rootRotationOffsetEuler = Vector3.zero; - visualLocalPositionOffset = Vector3.zero; - visualLocalRotationOffsetEuler = Vector3.zero; - } - - [ContextMenu("Calibrate Original Length From Renderer Bounds")] - private void CalibrateOriginalLengthFromRendererBounds() - { - Renderer renderer = visualRoot != null ? visualRoot.GetComponentInChildren(true) : GetComponentInChildren(true); - if (renderer == null) - { - Debug.LogWarning("FishingModelLineFollower: Renderer를 찾지 못해서 Original Length를 자동 계산할 수 없습니다.", this); - return; - } - - Vector3 size = renderer.bounds.size; - float measured = Mathf.Max(size.x, Mathf.Max(size.y, size.z)); - originalLength = Mathf.Max(0.0001f, measured); - - Debug.Log($"FishingModelLineFollower: Original Length를 {originalLength:F4}로 설정했습니다.", this); - } - - public void SetTargets(Transform startPoint, Transform endPoint) - { - rodTipPoint = startPoint; - bobberPoint = endPoint; - } - - public void SetReverseVisualDirection(bool value) - { - reverseVisualDirection = value; - } - - public void SetOriginalLength(float value) - { - originalLength = Mathf.Max(0.0001f, value); - } -} diff --git a/Assets/My project/Fishing Scripts/UI/FishingModelLineFollower.cs.meta b/Assets/My project/Fishing Scripts/UI/FishingModelLineFollower.cs.meta deleted file mode 100644 index e9b2ec2f..00000000 --- a/Assets/My project/Fishing Scripts/UI/FishingModelLineFollower.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: a8d0073af66f0fc49a7fb32df0bf5e41 \ No newline at end of file diff --git a/Assets/My project/Fishing Scripts/UI/FishingRodState.cs b/Assets/My project/Fishing Scripts/UI/FishingRodState.cs deleted file mode 100644 index ca8a9cad..00000000 --- a/Assets/My project/Fishing Scripts/UI/FishingRodState.cs +++ /dev/null @@ -1,37 +0,0 @@ -using UnityEngine; - -/// -/// 낚싯대를 잡고 있는지 기록하는 간단한 상태 스크립트입니다. -/// FishingRod 오브젝트에 붙이고, XR Grab Interactable의 Select Entered/Exited 이벤트에 연결하세요. -/// -public class FishingRodState : MonoBehaviour -{ - [Header("State")] - [SerializeField] private bool isHeld; - - [Header("Debug")] - [SerializeField] private bool showDebugLog = true; - - public bool IsHeld => isHeld; - - public void MarkHeld() - { - SetHeld(true); - } - - public void MarkReleased() - { - SetHeld(false); - } - - public void SetHeld(bool value) - { - if (isHeld == value) - return; - - isHeld = value; - - if (showDebugLog) - Debug.Log(isHeld ? "낚싯대 잡음" : "낚싯대 놓음"); - } -} diff --git a/Assets/My project/Fishing Scripts/UI/FishingRodState.cs.meta b/Assets/My project/Fishing Scripts/UI/FishingRodState.cs.meta deleted file mode 100644 index 49277dd9..00000000 --- a/Assets/My project/Fishing Scripts/UI/FishingRodState.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 19b938e652163b1459e2a5d8d862510b \ No newline at end of file diff --git a/Assets/My project/Fishing Scripts/UI/FishingRodVRController.cs b/Assets/My project/Fishing Scripts/UI/FishingRodVRController.cs new file mode 100644 index 00000000..4c4dea39 --- /dev/null +++ b/Assets/My project/Fishing Scripts/UI/FishingRodVRController.cs @@ -0,0 +1,1537 @@ +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.InputSystem; + +/// +/// Integrated VR fishing rod controller. +/// +/// Replaces the following helper scripts when you want a simpler VR fishing setup: +/// - FishingModelLineFollower +/// - FishingBobberVRController +/// - FishingBobberWaterDetector +/// - FishingRodState +/// - FishingStartTrigger +/// +/// Keep FishingGameManager, FishingGaugeUI, FishingRewardSystem, FishingHapticManager, +/// FishingUIEffects, FishingItemType, and RotateUI as separate scripts. +/// +/// Recommended hierarchy: +/// Fishing rod +/// - Rigidbody +/// - XR Grab Interactable +/// - FishingRodVRController +/// - RodLineEndPoint +/// - BobberLineStartPoint +/// - Bobber / Hook_2 +/// - FishingLineRoot (optional empty object for generated line mesh) +/// +public class FishingRodVRController : MonoBehaviour +{ + public enum BobberState + { + Idle, + Casting, + WaitingInWater, + Bite, + MiniGameActive, + Returning + } + + public enum StartMode + { + Disabled, + StartActionInArea, + OnBite, + ManualOnly + } + + [Header("Core References")] + [SerializeField] private FishingGameManager fishingGameManager; + [SerializeField] private FishingHapticManager haptic; + + [Tooltip("Line start point. Place this at the fishing rod tip / final guide ring.")] + [SerializeField] private Transform rodLineEndPoint; + + [Tooltip("Line end point. The visible bobber should usually be a child of this object.")] + [SerializeField] private Transform bobberLineStartPoint; + + [Tooltip("Visible bobber or hook model. Usually a child of BobberLineStartPoint. Used for optional visual correction/shake.")] + [SerializeField] private Transform bobberVisualRoot; + + [Header("Rod Held State")] + [Tooltip("Call MarkHeld/MarkReleased from XR Grab Interactable Select Entered/Exited events.")] + [SerializeField] private bool isHeld; + [SerializeField] private bool showHeldDebugLog = true; + + [Header("Input Actions")] + [Tooltip("Used to cast the bobber forward.")] + [SerializeField] private InputActionReference castAction; + + [Tooltip("Used to return the bobber to the rod tip.")] + [SerializeField] private InputActionReference returnAction; + + [Tooltip("Used to start fishing while player is in the start area, if Start Mode = StartActionInArea.")] + [SerializeField] private InputActionReference startAction; + + [Tooltip("If the action is not already enabled by Input Action Manager, this script enables it temporarily.")] + [SerializeField] private bool enableInputActionsManually = true; + + [Header("Start Area / Start Rules")] + [SerializeField] private StartMode startMode = StartMode.OnBite; + + [Tooltip("If On, StartActionInArea mode requires the rod to be held.")] + [SerializeField] private bool requireRodHeldToStart = true; + + [Tooltip("If On, CastForward requires the rod to be held.")] + [SerializeField] private bool requireRodHeldToCast = true; + + [Tooltip("Shown while player is inside the start area and the rules allow starting.")] + [SerializeField] private GameObject startGuideUI; + + [Tooltip("If On, an OverlapBox is used instead of a separate FishingStartTrigger component.")] + [SerializeField] private bool useStartAreaCheck = false; + + [SerializeField] private Transform startAreaCenter; + [SerializeField] private Vector3 startAreaHalfExtents = new Vector3(1.5f, 1.2f, 1.5f); + [SerializeField] private bool startAreaUsePlayerLayerMask = false; + [SerializeField] private LayerMask startAreaPlayerLayerMask = ~0; + [SerializeField] private string playerTag = "Player"; + [SerializeField] private bool hideGuideWhenFishingStarts = true; + [SerializeField] private bool allowRestartAfterClear = false; + + [Header("Procedural Fishing Line")] + [Tooltip("Optional transform that owns the generated MeshFilter/MeshRenderer. If empty, this object is used.")] + [SerializeField] private Transform lineMeshRoot; + + [SerializeField] private Material lineMaterial; + [SerializeField] private float lineRadius = 0.0012f; + [SerializeField] private int lineSegments = 12; + [SerializeField] private int lineSides = 6; + [SerializeField] private bool lineUseSag = false; + [SerializeField] private float lineSagAmount = 0.02f; + [SerializeField] private float lineDistanceSagMultiplier = 0.01f; + [SerializeField] private float lineMaxSagAmount = 0.08f; + [SerializeField] private Vector3 lineSagDirection = Vector3.down; + [SerializeField] private bool lineAddEndCaps = false; + [SerializeField] private bool hideLineWhenMissingTargets = true; + [SerializeField] private bool drawLineDebug = false; + + [Header("Bobber Idle / Attachment")] + [Tooltip("If set, ReturnBobber uses this world position. If empty, initial BobberLineStartPoint local position is used.")] + [SerializeField] private Transform bobberRestPoint; + + [Tooltip("On Start, put BobberLineStartPoint at its rest position.")] + [SerializeField] private bool returnBobberToRestOnStart = true; + + [Tooltip("If On, BobberLineStartPoint is kept at the cast world position after casting, even while the rod moves.")] + [SerializeField] private bool pinBobberWorldPositionAfterCast = true; + + [Tooltip("If the visible bobber is not a child of BobberLineStartPoint, this can force it to the line end.")] + [SerializeField] private bool forceBobberVisualToLineEnd = false; + + [SerializeField] private Vector3 bobberVisualLocalOffset = Vector3.zero; + [SerializeField] private Vector3 bobberVisualWorldOffset = Vector3.zero; + + [Header("Casting")] + [SerializeField] private Transform castDirectionSource; + [SerializeField] private float castDistance = 4f; + [SerializeField] private float castHeight = 1.1f; + [SerializeField] private float castDuration = 0.65f; + [SerializeField] private bool flattenCastDirection = true; + + [Tooltip("If On, raycast down to find water hit point for the cast target.")] + [SerializeField] private bool useWaterRaycastTarget = true; + [SerializeField] private LayerMask waterRaycastMask = 0; + [SerializeField] private float waterRaycastStartUp = 2f; + [SerializeField] private float waterRaycastDownDistance = 8f; + [SerializeField] private bool useFixedWaterHeightFallback = false; + [SerializeField] private float fixedWaterHeight = 0f; + [SerializeField] private float bobberFloatHeightOffset = 0.02f; + + [Header("Water Detection")] + [Tooltip("If On, this script checks water with OverlapSphere around BobberLineStartPoint. No BobberWaterDetector is needed.")] + [SerializeField] private bool useWaterOverlapCheck = true; + [SerializeField] private float waterCheckRadius = 0.08f; + [SerializeField] private bool useWaterLayerMask = true; + [SerializeField] private LayerMask waterLayerMask = 0; + [SerializeField] private bool useWaterTag = true; + [SerializeField] private string waterTag = "Water"; + + [Header("Bite")] + [SerializeField] private bool useBiteTimer = true; + [SerializeField] private Vector2 biteDelayRange = new Vector2(1.5f, 4.0f); + [SerializeField] private bool startMiniGameOnBite = true; + [SerializeField] private bool stopBiteShakeWhenMiniGameStarts = true; + [SerializeField] private float biteShakeAmplitude = 0.035f; + [SerializeField] private float biteShakeFrequency = 18f; + [SerializeField] private float biteShakeDuration = 1.25f; + [SerializeField] private bool keepShakingUntilMiniGameStarts = false; + + [Header("Reel Handle / Line Length Control")] + [Tooltip("If On, rotating a hand/controller around the reel center changes BobberLineStartPoint distance, so the procedural line becomes shorter/longer.")] + [SerializeField] private bool useReelControl = true; + + [Tooltip("Usually the center/pivot of the reel. The controller should move around this point.")] + [SerializeField] private Transform reelCenterPoint; + + [Tooltip("Usually the off-hand controller transform, or a reel-handle tracking transform.")] + [SerializeField] private Transform reelRotationSource; + + [Tooltip("If On, Reel Hold Action must be pressed to reel. If Off and Use Reel Grab Events is also Off, being near the reel is enough.")] + [SerializeField] private bool useReelHoldAction = true; + + [Tooltip("Button/Grip action used while reeling. Example binding: {LeftHand}/gripPressed or {LeftHand}/triggerPressed.")] + [SerializeField] private InputActionReference reelHoldAction; + + [Tooltip("If On, call MarkReelHandleGrabbed/MarkReelHandleReleased from a reel handle XR Grab Interactable or trigger volume.")] + [SerializeField] private bool useReelGrabEvents = false; + + [Tooltip("If On, the rod must be held before reeling is allowed.")] + [SerializeField] private bool requireRodHeldToReel = true; + + [Tooltip("켜면 입질 이후 또는 미니게임 중일 때만 릴 감기가 됩니다. 기본 낚시가 먼저 되게 하려면 On 추천.")] + [SerializeField] private bool reelOnlyAfterBiteOrMiniGame = true; + + [Tooltip("디버그용입니다. Hold Action과 Grab Events가 모두 꺼져 있어도 릴 근처에 있으면 감기게 합니다.")] + [SerializeField] private bool allowReelByProximityOnlyForDebug = false; + + [Tooltip("Maximum distance from Reel Center Point to Reel Rotation Source to start reeling.")] + [SerializeField] private float reelActivationRadius = 0.35f; + + [Tooltip("Reel axis in Reel Center Point local space. Try Local X first, then Y/Z depending on your reel model.")] + [SerializeField] private Vector3 reelLocalAxis = Vector3.right; + + [Tooltip("Invert if turning the handle makes the line longer instead of shorter.")] + [SerializeField] private bool invertReelDirection = false; + + [Tooltip("How many meters of line change per full 360 degree reel turn.")] + [SerializeField] private float lineLengthPerReelTurn = 0.45f; + + [SerializeField] private float minReelLineLength = 0.35f; + [SerializeField] private float maxReelLineLength = 8f; + + [Tooltip("If Off, reverse rotation will not let more line out; it only reels in.")] + [SerializeField] private bool allowReelOut = true; + + [Tooltip("Optional visual object to rotate when reeling. This is only visual.")] + [SerializeField] private Transform reelHandleVisual; + + [SerializeField] private bool rotateReelHandleVisual = true; + + [Tooltip("Reel handle visual axis in its own local space.")] + [SerializeField] private Vector3 reelHandleVisualLocalAxis = Vector3.right; + + [SerializeField] private float reelHandleVisualDegreesMultiplier = 1f; + + [Tooltip("When a cast finishes, current line length is initialized from rod tip to bobber distance.")] + [SerializeField] private bool initializeLineLengthAfterCast = true; + + [SerializeField] private bool showReelDebugLog = false; + + [Header("Return")] + [SerializeField] private float returnDuration = 0.35f; + + [Header("Debug")] + [SerializeField] private bool showDebugLog = true; + [SerializeField] private bool drawStartAreaGizmo = true; + [SerializeField] private bool drawWaterCheckGizmo = true; + + private MeshFilter lineMeshFilter; + private MeshRenderer lineMeshRenderer; + private Mesh lineMesh; + private Material generatedLineMaterial; + + private Coroutine bobberMoveRoutine; + private Coroutine biteWaitRoutine; + private Coroutine biteShakeRoutine; + + private bool castActionWasEnabled; + private bool returnActionWasEnabled; + private bool reelHoldActionWasEnabled; + private bool startActionWasEnabled; + + private BobberState state = BobberState.Idle; + private bool playerInsideStartArea; + private bool bobberInWater; + private bool bobberWorldPinned; + private Vector3 pinnedBobberWorldPosition; + private Vector3 initialBobberLocalPosition; + private Quaternion initialBobberLocalRotation; + private bool hasInitialBobberTransform; + private Vector3 bobberVisualInitialLocalPosition; + private bool hasBobberVisualInitialLocalPosition; + + private bool reelHeldByEvent; + private bool reelInteractionActive; + private bool reelAngleInitialized; + private float previousReelAngle; + private float currentLineLength; + private bool hasCurrentLineLength; + + private const float Epsilon = 0.000001f; + + public bool IsHeld => isHeld; + public bool PlayerInsideStartArea => playerInsideStartArea; + public bool IsBobberInWater => bobberInWater; + public bool IsBiting => state == BobberState.Bite; + public bool IsReeling => reelInteractionActive; + public float CurrentLineLength => hasCurrentLineLength ? currentLineLength : GetCurrentRodToBobberDistance(); + public BobberState State => state; + + private void Reset() + { + AutoBindCommonReferences(); + } + + private void Awake() + { + AutoBindCommonReferences(); + CacheInitialBobberTransform(); + CacheBobberVisualPosition(); + EnsureLineMeshComponents(true); + SetStartGuideVisible(false); + } + + private void Start() + { + if (returnBobberToRestOnStart) + ReturnBobberToRestInstant(); + } + + private void OnEnable() + { + RegisterInputAction(castAction, OnCastInput, ref castActionWasEnabled); + RegisterInputAction(returnAction, OnReturnInput, ref returnActionWasEnabled); + RegisterPassiveInputAction(reelHoldAction, ref reelHoldActionWasEnabled); + RegisterInputAction(startAction, OnStartInput, ref startActionWasEnabled); + } + + private void OnDisable() + { + UnregisterInputAction(castAction, OnCastInput, castActionWasEnabled); + UnregisterInputAction(returnAction, OnReturnInput, returnActionWasEnabled); + UnregisterPassiveInputAction(reelHoldAction, reelHoldActionWasEnabled); + UnregisterInputAction(startAction, OnStartInput, startActionWasEnabled); + StopAllRoutinesSafe(); + SetStartGuideVisible(false); + } + + private void OnValidate() + { + startAreaHalfExtents.x = Mathf.Max(0.01f, startAreaHalfExtents.x); + startAreaHalfExtents.y = Mathf.Max(0.01f, startAreaHalfExtents.y); + startAreaHalfExtents.z = Mathf.Max(0.01f, startAreaHalfExtents.z); + + lineRadius = Mathf.Max(0.00005f, lineRadius); + lineSegments = Mathf.Clamp(lineSegments, 1, 128); + lineSides = Mathf.Clamp(lineSides, 3, 24); + lineSagAmount = Mathf.Max(0f, lineSagAmount); + lineDistanceSagMultiplier = Mathf.Max(0f, lineDistanceSagMultiplier); + lineMaxSagAmount = Mathf.Max(0f, lineMaxSagAmount); + + castDistance = Mathf.Max(0.1f, castDistance); + castHeight = Mathf.Max(0f, castHeight); + castDuration = Mathf.Max(0.01f, castDuration); + waterRaycastStartUp = Mathf.Max(0f, waterRaycastStartUp); + waterRaycastDownDistance = Mathf.Max(0.1f, waterRaycastDownDistance); + bobberFloatHeightOffset = Mathf.Max(0f, bobberFloatHeightOffset); + waterCheckRadius = Mathf.Max(0.001f, waterCheckRadius); + + biteDelayRange.x = Mathf.Max(0f, biteDelayRange.x); + biteDelayRange.y = Mathf.Max(biteDelayRange.x, biteDelayRange.y); + biteShakeAmplitude = Mathf.Max(0f, biteShakeAmplitude); + biteShakeFrequency = Mathf.Max(0f, biteShakeFrequency); + biteShakeDuration = Mathf.Max(0f, biteShakeDuration); + reelActivationRadius = Mathf.Max(0.01f, reelActivationRadius); + lineLengthPerReelTurn = Mathf.Max(0.0001f, lineLengthPerReelTurn); + minReelLineLength = Mathf.Max(0.01f, minReelLineLength); + maxReelLineLength = Mathf.Max(minReelLineLength, maxReelLineLength); + if (reelLocalAxis.sqrMagnitude <= Epsilon) + reelLocalAxis = Vector3.right; + if (reelHandleVisualLocalAxis.sqrMagnitude <= Epsilon) + reelHandleVisualLocalAxis = Vector3.right; + returnDuration = Mathf.Max(0.01f, returnDuration); + } + + private void Update() + { + UpdateStartAreaState(); + UpdateWaterState(); + UpdateReelControl(); + UpdateBiteVisualPin(); + } + + private void LateUpdate() + { + if (bobberWorldPinned && bobberLineStartPoint != null) + bobberLineStartPoint.position = GetPinnedBobberPositionWithBiteOffset(); + + UpdateBobberVisualAttachment(); + UpdateProceduralLine(); + } + + [ContextMenu("Auto Bind Common References")] + public void AutoBindCommonReferences() + { + if (fishingGameManager == null) + fishingGameManager = GetComponentInParent(); + + if (haptic == null) + haptic = GetComponentInParent(); + + if (rodLineEndPoint == null) + rodLineEndPoint = FindChildRecursive(transform, "RodLineEndPoint", "RodTipPoint", "RodTip", "TipPoint"); + + if (bobberLineStartPoint == null) + bobberLineStartPoint = FindChildRecursive(transform, "BobberLineStartPoint", "BobberPoint", "BobberRoot", "HookPoint"); + + if (bobberVisualRoot == null && bobberLineStartPoint != null && bobberLineStartPoint.childCount > 0) + bobberVisualRoot = bobberLineStartPoint.GetChild(0); + + if (lineMeshRoot == null) + lineMeshRoot = FindChildRecursive(transform, "FishingLine", "FishingLineRoot", "LineRoot", "ProceduralLineRoot"); + + if (castDirectionSource == null) + castDirectionSource = rodLineEndPoint != null ? rodLineEndPoint : transform; + + if (reelCenterPoint == null) + reelCenterPoint = FindChildRecursive(transform, "ReelCenterPoint", "ReelPivot", "ReelHandlePivot", "ReelCenter"); + + if (reelHandleVisual == null) + reelHandleVisual = FindChildRecursive(transform, "ReelHandleVisual", "ReelHandle", "ReelKnob", "ReelHandleKnob"); + } + + public void MarkHeld() + { + SetHeld(true); + } + + public void MarkReleased() + { + SetHeld(false); + } + + public void MarkReelHandleGrabbed() + { + reelHeldByEvent = true; + reelAngleInitialized = false; + LogReel("릴 손잡이 잡음"); + } + + public void MarkReelHandleReleased() + { + reelHeldByEvent = false; + StopReelInteraction(); + LogReel("릴 손잡이 놓음"); + } + + public void SetHeld(bool value) + { + if (isHeld == value) + return; + + isHeld = value; + + if (showHeldDebugLog) + Debug.Log(isHeld ? "낚싯대 잡음" : "낚싯대 놓음", this); + } + + public void CastForward() + { + if (requireRodHeldToCast && !isHeld) + { + Log("낚싯대를 잡고 있지 않아 캐스팅을 무시했습니다."); + return; + } + + if (rodLineEndPoint == null || bobberLineStartPoint == null) + { + Debug.LogWarning("[FishingRodVRController] RodLineEndPoint 또는 BobberLineStartPoint가 없습니다.", this); + return; + } + + Vector3 target = CalculateCastTarget(); + CastToWorldPoint(target); + } + + public void CastToWorldPoint(Vector3 worldTarget) + { + if (bobberLineStartPoint == null) + return; + + StopBobberMoveAndBiteRoutines(); + bobberWorldPinned = false; + state = BobberState.Casting; + bobberMoveRoutine = StartCoroutine(CastRoutine(worldTarget)); + } + + public void ReturnBobberToRest() + { + if (bobberLineStartPoint == null) + return; + + StopBobberMoveAndBiteRoutines(); + bobberWorldPinned = false; + state = BobberState.Returning; + bobberMoveRoutine = StartCoroutine(MoveBobberRoutine(GetRestWorldPosition(), returnDuration, BobberState.Idle)); + } + + public void ReturnBobberToRestInstant() + { + if (bobberLineStartPoint == null) + return; + + StopBobberMoveAndBiteRoutines(); + bobberWorldPinned = false; + bobberLineStartPoint.position = GetRestWorldPosition(); + InitializeReelLineLengthFromCurrentDistance(); + ResetBobberVisualPosition(); + state = BobberState.Idle; + bobberInWater = false; + } + + public void ForceSetReelLineLength(float length) + { + SetReelLineLength(length); + } + + public void ForceMiniGameActiveState() + { + if (state == BobberState.Bite || state == BobberState.WaitingInWater || state == BobberState.Idle) + state = BobberState.MiniGameActive; + } + + public bool TryStartFishing() + { + if (fishingGameManager == null) + { + Debug.LogWarning("[FishingRodVRController] FishingGameManager가 연결되지 않았습니다.", this); + return false; + } + + if (!allowRestartAfterClear && fishingGameManager.IsMemoryPieceCollected) + { + Log("이미 기억의 조각을 획득해서 낚시 시작을 막았습니다."); + return false; + } + + if (requireRodHeldToStart && !isHeld) + { + Log("낚싯대를 잡고 있지 않아 낚시 시작을 막았습니다."); + return false; + } + + if (startMode == StartMode.StartActionInArea && useStartAreaCheck && !playerInsideStartArea) + { + Log("플레이어가 낚시 시작 영역 안에 있지 않습니다."); + return false; + } + + if (fishingGameManager.IsFishingSessionRunning) + { + Log("낚시 세션이 이미 진행 중입니다."); + return false; + } + + fishingGameManager.StartFishing(); + state = BobberState.MiniGameActive; + + if (hideGuideWhenFishingStarts) + SetStartGuideVisible(false); + + Log("낚시 미니게임 시작"); + return true; + } + + public void ForceBite() + { + TriggerBite(); + } + + public void StopFishingRodController() + { + StopAllRoutinesSafe(); + bobberWorldPinned = false; + state = BobberState.Idle; + SetStartGuideVisible(false); + } + + private void OnCastInput(InputAction.CallbackContext context) + { + CastForward(); + } + + private void OnReturnInput(InputAction.CallbackContext context) + { + ReturnBobberToRest(); + } + + private void OnStartInput(InputAction.CallbackContext context) + { + if (startMode == StartMode.StartActionInArea || startMode == StartMode.ManualOnly) + TryStartFishing(); + } + + private IEnumerator CastRoutine(Vector3 target) + { + Vector3 start = bobberLineStartPoint.position; + Vector3 control = (start + target) * 0.5f + Vector3.up * castHeight; + float timer = 0f; + + while (timer < castDuration) + { + timer += Time.deltaTime; + float t = Mathf.Clamp01(timer / castDuration); + t = EaseOutCubic(t); + bobberLineStartPoint.position = QuadraticBezier(start, control, target, t); + yield return null; + } + + bobberLineStartPoint.position = target; + pinnedBobberWorldPosition = target; + bobberWorldPinned = pinBobberWorldPositionAfterCast; + if (initializeLineLengthAfterCast) + InitializeReelLineLengthFromCurrentDistance(); + bobberMoveRoutine = null; + state = BobberState.WaitingInWater; + + Log("찌 캐스팅 완료"); + + if (!useWaterOverlapCheck && useBiteTimer) + StartWaitingForBite(); + } + + private IEnumerator MoveBobberRoutine(Vector3 target, float duration, BobberState endState) + { + Vector3 start = bobberLineStartPoint.position; + float timer = 0f; + + while (timer < duration) + { + timer += Time.deltaTime; + float t = Mathf.Clamp01(timer / duration); + bobberLineStartPoint.position = Vector3.Lerp(start, target, EaseOutCubic(t)); + yield return null; + } + + bobberLineStartPoint.position = target; + InitializeReelLineLengthFromCurrentDistance(); + ResetBobberVisualPosition(); + state = endState; + bobberMoveRoutine = null; + } + + private void StartWaitingForBite() + { + if (!useBiteTimer) + return; + + if (biteWaitRoutine != null || state == BobberState.Bite || state == BobberState.MiniGameActive) + return; + + state = BobberState.WaitingInWater; + biteWaitRoutine = StartCoroutine(BiteWaitRoutine()); + Log("입질 대기 시작"); + } + + private IEnumerator BiteWaitRoutine() + { + float delay = UnityEngine.Random.Range(biteDelayRange.x, biteDelayRange.y); + float timer = 0f; + + while (timer < delay) + { + timer += Time.deltaTime; + + if (useWaterOverlapCheck && !bobberInWater) + { + biteWaitRoutine = null; + yield break; + } + + yield return null; + } + + biteWaitRoutine = null; + TriggerBite(); + } + + private void TriggerBite() + { + if (state == BobberState.MiniGameActive) + return; + + state = BobberState.Bite; + Log("입질 발생"); + + if (haptic != null) + haptic.Good(); + + if (biteShakeRoutine != null) + StopCoroutine(biteShakeRoutine); + + biteShakeRoutine = StartCoroutine(BiteShakeRoutine()); + + if (startMode == StartMode.OnBite && startMiniGameOnBite) + { + if (TryStartFishing() && stopBiteShakeWhenMiniGameStarts && !keepShakingUntilMiniGameStarts) + StopBiteShakeOnly(); + } + } + + private IEnumerator BiteShakeRoutine() + { + CacheBobberVisualPosition(); + + float timer = 0f; + while (keepShakingUntilMiniGameStarts || timer < biteShakeDuration) + { + timer += Time.deltaTime; + yield return null; + } + + ResetBobberVisualPosition(); + biteShakeRoutine = null; + } + + private void UpdateBiteVisualPin() + { + // The actual vertical offset is applied through GetPinnedBobberPositionWithBiteOffset() + // so the line end and bobber point always remain identical. + } + + private Vector3 GetPinnedBobberPositionWithBiteOffset() + { + if (state != BobberState.Bite || biteShakeAmplitude <= 0f) + return pinnedBobberWorldPosition; + + float y = Mathf.Sin(Time.time * biteShakeFrequency) * biteShakeAmplitude; + return pinnedBobberWorldPosition + Vector3.up * y; + } + + private void UpdateStartAreaState() + { + if (startMode != StartMode.StartActionInArea || !useStartAreaCheck) + { + playerInsideStartArea = true; + if (startMode != StartMode.StartActionInArea) + SetStartGuideVisible(false); + return; + } + + bool inside = IsPlayerInsideStartArea(); + playerInsideStartArea = inside; + + bool canShow = inside && CanShowStartGuide(); + SetStartGuideVisible(canShow); + } + + private bool CanShowStartGuide() + { + if (fishingGameManager != null) + { + if (fishingGameManager.IsFishingSessionRunning) + return false; + + if (!allowRestartAfterClear && fishingGameManager.IsMemoryPieceCollected) + return false; + } + + if (requireRodHeldToStart && !isHeld) + return false; + + return true; + } + + private bool IsPlayerInsideStartArea() + { + Transform area = startAreaCenter != null ? startAreaCenter : transform; + LayerMask mask = startAreaUsePlayerLayerMask ? startAreaPlayerLayerMask : ~0; + Collider[] hits = Physics.OverlapBox(area.position, startAreaHalfExtents, area.rotation, mask, QueryTriggerInteraction.Collide); + + for (int i = 0; i < hits.Length; i++) + { + if (IsPlayerCollider(hits[i])) + return true; + } + + return false; + } + + private bool IsPlayerCollider(Collider other) + { + if (other == null) + return false; + + if (startAreaUsePlayerLayerMask && startAreaPlayerLayerMask.value != 0) + { + Transform currentForLayer = other.transform; + while (currentForLayer != null) + { + if (((1 << currentForLayer.gameObject.layer) & startAreaPlayerLayerMask.value) != 0) + return true; + + currentForLayer = currentForLayer.parent; + } + } + + if (string.IsNullOrWhiteSpace(playerTag)) + return !startAreaUsePlayerLayerMask; + + Transform current = other.transform; + while (current != null) + { + if (CompareTagSafe(current.gameObject, playerTag)) + return true; + + current = current.parent; + } + + return false; + } + + private void UpdateWaterState() + { + if (!useWaterOverlapCheck || bobberLineStartPoint == null) + return; + + bool inWaterNow = IsBobberOverlappingWater(); + + if (inWaterNow == bobberInWater) + return; + + bobberInWater = inWaterNow; + + if (bobberInWater) + { + Log("찌가 물에 들어감"); + if (state == BobberState.Casting || state == BobberState.WaitingInWater || state == BobberState.Idle) + StartWaitingForBite(); + } + else + { + Log("찌가 물에서 나감"); + + if (state == BobberState.WaitingInWater || state == BobberState.Bite) + { + StopBiteWaitOnly(); + StopBiteShakeOnly(); + state = BobberState.Idle; + } + } + } + + private bool IsBobberOverlappingWater() + { + LayerMask mask = useWaterLayerMask && waterLayerMask.value != 0 ? waterLayerMask : ~0; + Collider[] hits = Physics.OverlapSphere(bobberLineStartPoint.position, waterCheckRadius, mask, QueryTriggerInteraction.Collide); + + for (int i = 0; i < hits.Length; i++) + { + Collider hit = hits[i]; + if (hit == null) + continue; + + bool layerMatch = !useWaterLayerMask || waterLayerMask.value == 0 || ((1 << hit.gameObject.layer) & waterLayerMask.value) != 0; + bool tagMatch = !useWaterTag || string.IsNullOrWhiteSpace(waterTag) || CompareTagSafe(hit.gameObject, waterTag); + + if (useWaterLayerMask && useWaterTag && waterLayerMask.value != 0 && !string.IsNullOrWhiteSpace(waterTag)) + { + if (layerMatch || tagMatch) + return true; + } + else if (layerMatch && tagMatch) + { + return true; + } + } + + return false; + } + + + private void UpdateReelControl() + { + if (!useReelControl) + { + StopReelInteraction(); + return; + } + + if (rodLineEndPoint == null || bobberLineStartPoint == null || reelCenterPoint == null || reelRotationSource == null) + { + StopReelInteraction(); + return; + } + + if (requireRodHeldToReel && !isHeld) + { + StopReelInteraction(); + return; + } + + if (state == BobberState.Casting || state == BobberState.Returning) + { + StopReelInteraction(); + return; + } + + if (reelOnlyAfterBiteOrMiniGame && state != BobberState.Bite && state != BobberState.MiniGameActive) + { + StopReelInteraction(); + return; + } + + if (!ShouldReelInputBeActive()) + { + StopReelInteraction(); + return; + } + + float distanceToReel = Vector3.Distance(reelCenterPoint.position, reelRotationSource.position); + if (distanceToReel > reelActivationRadius) + { + StopReelInteraction(); + return; + } + + float currentAngle = GetReelSourceAngle(); + + if (!reelAngleInitialized) + { + previousReelAngle = currentAngle; + reelAngleInitialized = true; + reelInteractionActive = true; + InitializeReelLineLengthFromCurrentDistanceIfNeeded(); + LogReel("릴 감기 시작"); + return; + } + + float deltaAngle = Mathf.DeltaAngle(previousReelAngle, currentAngle); + previousReelAngle = currentAngle; + + if (Mathf.Abs(deltaAngle) < 0.01f) + return; + + if (invertReelDirection) + deltaAngle = -deltaAngle; + + // Positive deltaAngle is treated as reeling in, so line length decreases. + float lengthDelta = -deltaAngle / 360f * lineLengthPerReelTurn; + + if (!allowReelOut && lengthDelta > 0f) + lengthDelta = 0f; + + SetReelLineLength(CurrentLineLength + lengthDelta); + RotateReelHandleVisual(deltaAngle); + } + + private bool ShouldReelInputBeActive() + { + bool actionActive = useReelHoldAction && reelHoldAction != null && reelHoldAction.action != null && reelHoldAction.action.IsPressed(); + bool eventActive = useReelGrabEvents && reelHeldByEvent; + + if (!useReelHoldAction && !useReelGrabEvents) + return allowReelByProximityOnlyForDebug; + + return actionActive || eventActive; + } + + private void StopReelInteraction() + { + reelInteractionActive = false; + reelAngleInitialized = false; + } + + private float GetReelSourceAngle() + { + Vector3 axis = GetReelWorldAxis(); + Vector3 fromCenter = reelRotationSource.position - reelCenterPoint.position; + Vector3 projected = Vector3.ProjectOnPlane(fromCenter, axis); + + if (projected.sqrMagnitude <= Epsilon) + return previousReelAngle; + + projected.Normalize(); + + Vector3 reference = Vector3.ProjectOnPlane(reelCenterPoint.up, axis); + if (reference.sqrMagnitude <= Epsilon) + reference = Vector3.ProjectOnPlane(reelCenterPoint.forward, axis); + if (reference.sqrMagnitude <= Epsilon) + reference = Vector3.ProjectOnPlane(Vector3.up, axis); + if (reference.sqrMagnitude <= Epsilon) + reference = Vector3.right; + + reference.Normalize(); + return Vector3.SignedAngle(reference, projected, axis); + } + + private Vector3 GetReelWorldAxis() + { + if (reelCenterPoint == null) + return Vector3.right; + + Vector3 localAxis = reelLocalAxis.sqrMagnitude > Epsilon ? reelLocalAxis.normalized : Vector3.right; + Vector3 worldAxis = reelCenterPoint.TransformDirection(localAxis); + return SafeNormalize(worldAxis, reelCenterPoint.right); + } + + private void InitializeReelLineLengthFromCurrentDistanceIfNeeded() + { + if (!hasCurrentLineLength) + InitializeReelLineLengthFromCurrentDistance(); + } + + private void InitializeReelLineLengthFromCurrentDistance() + { + if (rodLineEndPoint == null || bobberLineStartPoint == null) + return; + + currentLineLength = Mathf.Clamp(GetCurrentRodToBobberDistance(), minReelLineLength, maxReelLineLength); + hasCurrentLineLength = true; + } + + private float GetCurrentRodToBobberDistance() + { + if (rodLineEndPoint == null || bobberLineStartPoint == null) + return 0f; + + Vector3 end = bobberWorldPinned ? pinnedBobberWorldPosition : bobberLineStartPoint.position; + return Vector3.Distance(rodLineEndPoint.position, end); + } + + private void SetReelLineLength(float targetLength) + { + if (rodLineEndPoint == null || bobberLineStartPoint == null) + return; + + currentLineLength = Mathf.Clamp(targetLength, minReelLineLength, maxReelLineLength); + hasCurrentLineLength = true; + + Vector3 start = rodLineEndPoint.position; + Vector3 baseEnd = bobberWorldPinned ? pinnedBobberWorldPosition : bobberLineStartPoint.position; + Vector3 direction = baseEnd - start; + + if (direction.sqrMagnitude <= Epsilon) + { + Transform source = castDirectionSource != null ? castDirectionSource : transform; + direction = source.forward; + } + + direction = SafeNormalize(direction, transform.forward); + Vector3 newEnd = start + direction * currentLineLength; + + if (bobberWorldPinned) + pinnedBobberWorldPosition = newEnd; + + bobberLineStartPoint.position = newEnd; + + if (state == BobberState.Idle && currentLineLength > minReelLineLength + 0.05f) + state = BobberState.WaitingInWater; + + LogReel($"릴 줄 길이: {currentLineLength:F2}m"); + } + + private void RotateReelHandleVisual(float deltaAngle) + { + if (!rotateReelHandleVisual || reelHandleVisual == null) + return; + + Vector3 axis = reelHandleVisualLocalAxis.sqrMagnitude > Epsilon ? reelHandleVisualLocalAxis.normalized : Vector3.right; + reelHandleVisual.Rotate(axis, deltaAngle * reelHandleVisualDegreesMultiplier, Space.Self); + } + + private Vector3 CalculateCastTarget() + { + Transform source = castDirectionSource != null ? castDirectionSource : (rodLineEndPoint != null ? rodLineEndPoint : transform); + Vector3 direction = source.forward; + + if (flattenCastDirection) + { + direction.y = 0f; + if (direction.sqrMagnitude <= Epsilon) + direction = transform.forward; + } + + direction = SafeNormalize(direction, transform.forward); + + Vector3 fallbackTarget = rodLineEndPoint.position + direction * castDistance; + + if (useFixedWaterHeightFallback) + fallbackTarget.y = fixedWaterHeight + bobberFloatHeightOffset; + + if (useWaterRaycastTarget && waterRaycastMask.value != 0) + { + Vector3 rayStart = fallbackTarget + Vector3.up * waterRaycastStartUp; + if (Physics.Raycast(rayStart, Vector3.down, out RaycastHit hit, waterRaycastDownDistance, waterRaycastMask, QueryTriggerInteraction.Collide)) + return hit.point + Vector3.up * bobberFloatHeightOffset; + } + + return fallbackTarget; + } + + private Vector3 GetRestWorldPosition() + { + if (bobberRestPoint != null) + return bobberRestPoint.position; + + if (hasInitialBobberTransform && bobberLineStartPoint.parent != null) + return bobberLineStartPoint.parent.TransformPoint(initialBobberLocalPosition); + + if (rodLineEndPoint != null) + return rodLineEndPoint.position + rodLineEndPoint.TransformDirection(new Vector3(0f, -0.2f, -0.15f)); + + return transform.position; + } + + private void UpdateBobberVisualAttachment() + { + if (!forceBobberVisualToLineEnd || bobberVisualRoot == null || bobberLineStartPoint == null) + return; + + bobberVisualRoot.position = bobberLineStartPoint.position + + bobberVisualWorldOffset + + bobberLineStartPoint.rotation * bobberVisualLocalOffset; + } + + private void CacheInitialBobberTransform() + { + if (bobberLineStartPoint == null) + return; + + initialBobberLocalPosition = bobberLineStartPoint.localPosition; + initialBobberLocalRotation = bobberLineStartPoint.localRotation; + hasInitialBobberTransform = true; + } + + private void CacheBobberVisualPosition() + { + if (bobberVisualRoot == null || hasBobberVisualInitialLocalPosition) + return; + + bobberVisualInitialLocalPosition = bobberVisualRoot.localPosition; + hasBobberVisualInitialLocalPosition = true; + } + + private void ResetBobberVisualPosition() + { + if (bobberVisualRoot == null || !hasBobberVisualInitialLocalPosition) + return; + + bobberVisualRoot.localPosition = bobberVisualInitialLocalPosition; + } + + private void UpdateProceduralLine() + { + if (rodLineEndPoint == null || bobberLineStartPoint == null) + { + SetLineVisible(!hideLineWhenMissingTargets); + return; + } + + EnsureLineMeshComponents(true); + + if (lineMeshFilter == null || lineMeshRenderer == null || lineMesh == null) + return; + + SetLineVisible(true); + + if (lineMaterial != null) + lineMeshRenderer.sharedMaterial = lineMaterial; + else + EnsureFallbackLineMaterial(); + + Vector3 start = rodLineEndPoint.position; + Vector3 end = bobberLineStartPoint.position; + Vector3 control = (start + end) * 0.5f; + + if (lineUseSag) + { + float distance = Vector3.Distance(start, end); + Vector3 sagDir = lineSagDirection.sqrMagnitude > Epsilon ? lineSagDirection.normalized : Vector3.down; + float finalSag = Mathf.Clamp(lineSagAmount + distance * lineDistanceSagMultiplier, 0f, lineMaxSagAmount); + control += sagDir * finalSag; + } + + BuildProceduralTubeMesh(start, control, end); + + if (drawLineDebug) + Debug.DrawLine(start, end, Color.yellow); + } + + private void EnsureLineMeshComponents(bool createIfMissing) + { + Transform root = lineMeshRoot != null ? lineMeshRoot : transform; + if (root == null) + return; + + if (lineMeshFilter == null) + lineMeshFilter = root.GetComponent(); + + if (lineMeshRenderer == null) + lineMeshRenderer = root.GetComponent(); + + if (!createIfMissing) + return; + + if (lineMeshFilter == null) + lineMeshFilter = root.gameObject.AddComponent(); + + if (lineMeshRenderer == null) + lineMeshRenderer = root.gameObject.AddComponent(); + + if (lineMesh == null) + { + lineMesh = new Mesh(); + lineMesh.name = "VR Fishing Procedural Line"; + lineMesh.MarkDynamic(); + } + + if (lineMeshFilter.sharedMesh != lineMesh) + lineMeshFilter.sharedMesh = lineMesh; + } + + private void EnsureFallbackLineMaterial() + { + if (lineMeshRenderer == null) + return; + + if (generatedLineMaterial == null) + { + Shader shader = Shader.Find("Universal Render Pipeline/Unlit"); + if (shader == null) + shader = Shader.Find("Unlit/Color"); + if (shader == null) + shader = Shader.Find("Standard"); + + generatedLineMaterial = new Material(shader); + generatedLineMaterial.name = "Generated_FishingLine_Material"; + generatedLineMaterial.hideFlags = HideFlags.DontSave; + + if (generatedLineMaterial.HasProperty("_Color")) + generatedLineMaterial.SetColor("_Color", new Color(0.02f, 0.02f, 0.02f, 1f)); + if (generatedLineMaterial.HasProperty("_BaseColor")) + generatedLineMaterial.SetColor("_BaseColor", new Color(0.02f, 0.02f, 0.02f, 1f)); + } + + lineMeshRenderer.sharedMaterial = generatedLineMaterial; + } + + private void SetLineVisible(bool visible) + { + if (lineMeshRenderer != null) + lineMeshRenderer.enabled = visible; + } + + private void BuildProceduralTubeMesh(Vector3 worldStart, Vector3 worldControl, Vector3 worldEnd) + { + if (lineMesh == null || lineMeshFilter == null) + return; + + Transform meshTransform = lineMeshFilter.transform; + int rings = Mathf.Max(2, lineSegments + 1); + int sides = Mathf.Max(3, lineSides); + int capVertexCount = lineAddEndCaps ? 2 : 0; + int vertexCount = rings * sides + capVertexCount; + int sideTriangleCount = (rings - 1) * sides * 6; + int capTriangleCount = lineAddEndCaps ? sides * 6 : 0; + + Vector3[] vertices = new Vector3[vertexCount]; + Vector3[] normals = new Vector3[vertexCount]; + Vector2[] uvs = new Vector2[vertexCount]; + int[] triangles = new int[sideTriangleCount + capTriangleCount]; + + Vector3 previousNormal = Vector3.zero; + + for (int r = 0; r < rings; r++) + { + float t = (float)r / (rings - 1); + Vector3 point = QuadraticBezier(worldStart, worldControl, worldEnd, t); + Vector3 tangent = SafeNormalize(QuadraticBezierTangent(worldStart, worldControl, worldEnd, t), Vector3.forward); + + Vector3 normal; + if (r == 0 || previousNormal.sqrMagnitude <= Epsilon) + { + Vector3 reference = Mathf.Abs(Vector3.Dot(tangent, Vector3.up)) > 0.94f ? Vector3.right : Vector3.up; + Vector3 binormalStart = Vector3.Cross(tangent, reference).normalized; + normal = Vector3.Cross(binormalStart, tangent).normalized; + } + else + { + normal = Vector3.ProjectOnPlane(previousNormal, tangent); + if (normal.sqrMagnitude <= Epsilon) + { + Vector3 reference = Mathf.Abs(Vector3.Dot(tangent, Vector3.up)) > 0.94f ? Vector3.right : Vector3.up; + Vector3 binormalFallback = Vector3.Cross(tangent, reference).normalized; + normal = Vector3.Cross(binormalFallback, tangent).normalized; + } + else + { + normal.Normalize(); + } + } + + Vector3 binormal = Vector3.Cross(tangent, normal).normalized; + previousNormal = normal; + + for (int s = 0; s < sides; s++) + { + float angle = Mathf.PI * 2f * s / sides; + Vector3 radial = Mathf.Cos(angle) * normal + Mathf.Sin(angle) * binormal; + Vector3 worldVertex = point + radial * lineRadius; + int index = r * sides + s; + vertices[index] = meshTransform.InverseTransformPoint(worldVertex); + normals[index] = meshTransform.InverseTransformDirection(radial).normalized; + uvs[index] = new Vector2((float)s / sides, t); + } + } + + int tri = 0; + for (int r = 0; r < rings - 1; r++) + { + for (int s = 0; s < sides; s++) + { + int a = r * sides + s; + int b = r * sides + (s + 1) % sides; + int c = (r + 1) * sides + s; + int d = (r + 1) * sides + (s + 1) % sides; + + triangles[tri++] = a; + triangles[tri++] = c; + triangles[tri++] = b; + + triangles[tri++] = b; + triangles[tri++] = c; + triangles[tri++] = d; + } + } + + if (lineAddEndCaps) + { + int startCenter = rings * sides; + int endCenter = startCenter + 1; + vertices[startCenter] = meshTransform.InverseTransformPoint(worldStart); + vertices[endCenter] = meshTransform.InverseTransformPoint(worldEnd); + normals[startCenter] = meshTransform.InverseTransformDirection(SafeNormalize(worldStart - worldControl, -Vector3.forward)); + normals[endCenter] = meshTransform.InverseTransformDirection(SafeNormalize(worldEnd - worldControl, Vector3.forward)); + uvs[startCenter] = new Vector2(0.5f, 0f); + uvs[endCenter] = new Vector2(0.5f, 1f); + + for (int s = 0; s < sides; s++) + { + int a = s; + int b = (s + 1) % sides; + triangles[tri++] = startCenter; + triangles[tri++] = b; + triangles[tri++] = a; + + int c = (rings - 1) * sides + s; + int d = (rings - 1) * sides + (s + 1) % sides; + triangles[tri++] = endCenter; + triangles[tri++] = c; + triangles[tri++] = d; + } + } + + lineMesh.Clear(); + lineMesh.vertices = vertices; + lineMesh.normals = normals; + lineMesh.uv = uvs; + lineMesh.triangles = triangles; + lineMesh.RecalculateBounds(); + } + + private void RegisterPassiveInputAction(InputActionReference actionReference, ref bool wasEnabled) + { + if (actionReference == null || actionReference.action == null) + return; + + wasEnabled = actionReference.action.enabled; + + if (enableInputActionsManually && !wasEnabled) + actionReference.action.Enable(); + } + + private void UnregisterPassiveInputAction(InputActionReference actionReference, bool wasEnabled) + { + if (actionReference == null || actionReference.action == null) + return; + + if (enableInputActionsManually && !wasEnabled) + actionReference.action.Disable(); + } + + private void RegisterInputAction(InputActionReference actionReference, Action callback, ref bool wasEnabled) + { + if (actionReference == null || actionReference.action == null) + return; + + wasEnabled = actionReference.action.enabled; + actionReference.action.performed += callback; + + if (enableInputActionsManually && !wasEnabled) + actionReference.action.Enable(); + } + + private void UnregisterInputAction(InputActionReference actionReference, Action callback, bool wasEnabled) + { + if (actionReference == null || actionReference.action == null) + return; + + actionReference.action.performed -= callback; + + if (enableInputActionsManually && !wasEnabled) + actionReference.action.Disable(); + } + + private void StopAllRoutinesSafe() + { + StopBobberMoveAndBiteRoutines(); + } + + private void StopBobberMoveAndBiteRoutines() + { + if (bobberMoveRoutine != null) + StopCoroutine(bobberMoveRoutine); + bobberMoveRoutine = null; + + StopBiteWaitOnly(); + StopBiteShakeOnly(); + } + + private void StopBiteWaitOnly() + { + if (biteWaitRoutine != null) + StopCoroutine(biteWaitRoutine); + biteWaitRoutine = null; + } + + private void StopBiteShakeOnly() + { + if (biteShakeRoutine != null) + StopCoroutine(biteShakeRoutine); + biteShakeRoutine = null; + ResetBobberVisualPosition(); + } + + private void SetStartGuideVisible(bool visible) + { + if (startGuideUI != null && startGuideUI.activeSelf != visible) + startGuideUI.SetActive(visible); + } + + private Transform FindChildRecursive(Transform root, params string[] names) + { + if (root == null || names == null) + return null; + + for (int i = 0; i < names.Length; i++) + { + if (string.Equals(NormalizeName(root.name), NormalizeName(names[i]), StringComparison.OrdinalIgnoreCase)) + return root; + } + + for (int i = 0; i < root.childCount; i++) + { + Transform found = FindChildRecursive(root.GetChild(i), names); + if (found != null) + return found; + } + + return null; + } + + private string NormalizeName(string value) + { + if (string.IsNullOrEmpty(value)) + return string.Empty; + + return value.Replace(" ", string.Empty) + .Replace("_", string.Empty) + .Replace("-", string.Empty) + .ToLowerInvariant(); + } + + private bool CompareTagSafe(GameObject obj, string tagName) + { + if (obj == null || string.IsNullOrWhiteSpace(tagName)) + return false; + + try + { + return obj.CompareTag(tagName); + } + catch + { + return false; + } + } + + private Vector3 QuadraticBezier(Vector3 a, Vector3 b, Vector3 c, float t) + { + float u = 1f - t; + return u * u * a + 2f * u * t * b + t * t * c; + } + + private Vector3 QuadraticBezierTangent(Vector3 a, Vector3 b, Vector3 c, float t) + { + return 2f * (1f - t) * (b - a) + 2f * t * (c - b); + } + + private Vector3 SafeNormalize(Vector3 value, Vector3 fallback) + { + if (value.sqrMagnitude <= Epsilon) + return fallback.sqrMagnitude > Epsilon ? fallback.normalized : Vector3.forward; + + return value.normalized; + } + + private float EaseOutCubic(float t) + { + t = Mathf.Clamp01(t); + t = 1f - t; + return 1f - t * t * t; + } + + private void LogReel(string message) + { + if (showReelDebugLog) + Debug.Log($"[FishingRodVRController/Reel] {message}", this); + } + + private void Log(string message) + { + if (showDebugLog) + Debug.Log($"[FishingRodVRController] {message}", this); + } + + private void OnDrawGizmosSelected() + { + if (drawStartAreaGizmo && startMode == StartMode.StartActionInArea && useStartAreaCheck) + { + Transform area = startAreaCenter != null ? startAreaCenter : transform; + Gizmos.color = new Color(0.2f, 0.8f, 1f, 0.25f); + Matrix4x4 oldMatrix = Gizmos.matrix; + Gizmos.matrix = Matrix4x4.TRS(area.position, area.rotation, Vector3.one); + Gizmos.DrawCube(Vector3.zero, startAreaHalfExtents * 2f); + Gizmos.color = new Color(0.2f, 0.8f, 1f, 1f); + Gizmos.DrawWireCube(Vector3.zero, startAreaHalfExtents * 2f); + Gizmos.matrix = oldMatrix; + } + + if (useReelControl && reelCenterPoint != null) + { + Gizmos.color = new Color(1f, 0.65f, 0.15f, 0.7f); + Gizmos.DrawWireSphere(reelCenterPoint.position, reelActivationRadius); + Vector3 axis = reelCenterPoint.TransformDirection(reelLocalAxis.sqrMagnitude > Epsilon ? reelLocalAxis.normalized : Vector3.right); + Gizmos.DrawLine(reelCenterPoint.position - axis * 0.15f, reelCenterPoint.position + axis * 0.15f); + } + + if (drawWaterCheckGizmo && bobberLineStartPoint != null) + { + Gizmos.color = new Color(0.2f, 0.6f, 1f, 0.6f); + Gizmos.DrawWireSphere(bobberLineStartPoint.position, waterCheckRadius); + } + } +} diff --git a/Assets/My project/Fishing Scripts/UI/FishingRodVRController.cs.meta b/Assets/My project/Fishing Scripts/UI/FishingRodVRController.cs.meta new file mode 100644 index 00000000..14351e73 --- /dev/null +++ b/Assets/My project/Fishing Scripts/UI/FishingRodVRController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f8b17139274961d4d9b190b0bb7d6e8e \ No newline at end of file diff --git a/Assets/My project/Fishing Scripts/UI/FishingStartTrigger.cs b/Assets/My project/Fishing Scripts/UI/FishingStartTrigger.cs deleted file mode 100644 index 2b10e488..00000000 --- a/Assets/My project/Fishing Scripts/UI/FishingStartTrigger.cs +++ /dev/null @@ -1,244 +0,0 @@ -using UnityEngine; -using UnityEngine.InputSystem; - -/// -/// 낚시터 시작 영역에 붙이는 스크립트입니다. -/// 플레이어가 Trigger 영역 안에 들어오면 안내 UI를 켜고, -/// 지정한 Start Action 입력이 들어오면 FishingGameManager.StartFishing()을 호출합니다. -/// 필요하면 낚싯대를 잡고 있을 때만 시작되도록 제한할 수 있습니다. -/// -[RequireComponent(typeof(Collider))] -public class FishingStartTrigger : MonoBehaviour -{ - [Header("References")] - [Tooltip("낚시 미니게임을 제어하는 FishingGameManager입니다.")] - [SerializeField] private FishingGameManager fishingGameManager; - - [Tooltip("낚시터 근처에 들어왔을 때 보여줄 시작 안내 UI입니다.")] - [SerializeField] private GameObject startGuideUI; - - [Header("Input")] - [Tooltip("낚시 시작 입력입니다. 예: XRI RightHand / Primary Button. SubmitAction과 같은 버튼은 피하는 것을 추천합니다.")] - [SerializeField] private InputActionReference startAction; - - [Tooltip("Input Action Manager가 없거나 액션이 자동 활성화되지 않으면 켜두세요.")] - [SerializeField] private bool enableInputActionManually = true; - - [Header("Player Check")] - [Tooltip("플레이어 루트 오브젝트의 태그입니다. 보통 XR Origin에 Player 태그를 붙입니다.")] - [SerializeField] private string playerTag = "Player"; - - [Tooltip("태그 체크를 끄고 모든 Collider 진입을 플레이어로 취급합니다. 테스트용입니다.")] - [SerializeField] private bool ignorePlayerTagForTest = false; - - [Header("Rod Requirement")] - [Tooltip("켜면 낚싯대를 잡고 있을 때만 낚시를 시작할 수 있습니다.")] - [SerializeField] private bool requireRodHeld = false; - - [Tooltip("낚싯대에 붙어 있는 FishingRodState입니다.")] - [SerializeField] private FishingRodState requiredRod; - - [Header("Rules")] - [Tooltip("플레이어가 영역에서 나가면 낚시를 중단하고 UI를 숨깁니다. VR에서는 처음에 Off 추천.")] - [SerializeField] private bool stopFishingOnExit = false; - - [Tooltip("낚시가 시작되면 시작 안내 UI를 숨깁니다.")] - [SerializeField] private bool hideGuideWhenFishingStarts = true; - - [Tooltip("기억의 조각을 이미 획득한 뒤에도 다시 시작할 수 있게 합니다.")] - [SerializeField] private bool allowRestartAfterClear = false; - - [Header("Debug")] - [SerializeField] private bool showDebugLog = true; - - private bool playerInside; - private bool actionWasEnabled; - - public bool PlayerInside => playerInside; - - private void Reset() - { - Collider col = GetComponent(); - if (col != null) - col.isTrigger = true; - } - - private void Awake() - { - Collider col = GetComponent(); - if (col != null && !col.isTrigger) - col.isTrigger = true; - - SetGuideVisible(false); - } - - private void OnEnable() - { - RegisterStartAction(); - } - - private void OnDisable() - { - UnregisterStartAction(); - } - - private void OnTriggerEnter(Collider other) - { - if (!IsPlayer(other)) - return; - - playerInside = true; - RefreshGuide(); - - if (showDebugLog) - Debug.Log("낚시 시작 영역 진입"); - } - - private void OnTriggerExit(Collider other) - { - if (!IsPlayer(other)) - return; - - playerInside = false; - SetGuideVisible(false); - - if (stopFishingOnExit && fishingGameManager != null) - fishingGameManager.StopFishing(true); - - if (showDebugLog) - Debug.Log("낚시 시작 영역 이탈"); - } - - private bool IsPlayer(Collider other) - { - if (ignorePlayerTagForTest) - return true; - - if (other == null) - return false; - - if (other.CompareTag(playerTag)) - return true; - - Transform current = other.transform; - while (current != null) - { - if (current.CompareTag(playerTag)) - return true; - - current = current.parent; - } - - return false; - } - - private void RegisterStartAction() - { - if (startAction == null || startAction.action == null) - return; - - actionWasEnabled = startAction.action.enabled; - startAction.action.performed += OnStartAction; - - if (enableInputActionManually && !actionWasEnabled) - startAction.action.Enable(); - } - - private void UnregisterStartAction() - { - if (startAction == null || startAction.action == null) - return; - - startAction.action.performed -= OnStartAction; - - if (enableInputActionManually && !actionWasEnabled) - startAction.action.Disable(); - } - - private void OnStartAction(InputAction.CallbackContext context) - { - TryStartFishing(); - } - - /// - /// UI 버튼이나 다른 스크립트에서도 호출할 수 있는 낚시 시작 함수입니다. - /// - public void TryStartFishing() - { - if (!CanStartFishing()) - return; - - fishingGameManager.StartFishing(); - - if (hideGuideWhenFishingStarts) - SetGuideVisible(false); - - if (showDebugLog) - Debug.Log("낚시 시작 요청 완료"); - } - - public bool CanStartFishing() - { - if (!playerInside) - return false; - - if (fishingGameManager == null) - { - if (showDebugLog) - Debug.LogWarning("FishingStartTrigger: FishingGameManager가 연결되지 않았습니다."); - - return false; - } - - if (fishingGameManager.IsActiveGame) - return false; - - if (fishingGameManager.IsMemoryPieceCollected && !allowRestartAfterClear) - return false; - - if (requireRodHeld) - { - if (requiredRod == null) - { - if (showDebugLog) - Debug.LogWarning("FishingStartTrigger: Require Rod Held가 켜져 있지만 Required Rod가 연결되지 않았습니다."); - - return false; - } - - if (!requiredRod.IsHeld) - return false; - } - - return true; - } - - public void RefreshGuide() - { - if (!playerInside) - { - SetGuideVisible(false); - return; - } - - if (fishingGameManager != null && fishingGameManager.IsMemoryPieceCollected && !allowRestartAfterClear) - { - SetGuideVisible(false); - return; - } - - if (fishingGameManager != null && fishingGameManager.IsActiveGame) - { - SetGuideVisible(false); - return; - } - - SetGuideVisible(true); - } - - private void SetGuideVisible(bool visible) - { - if (startGuideUI != null) - startGuideUI.SetActive(visible); - } -} diff --git a/Assets/My project/Fishing Scripts/UI/FishingStartTrigger.cs.meta b/Assets/My project/Fishing Scripts/UI/FishingStartTrigger.cs.meta deleted file mode 100644 index 5fba2800..00000000 --- a/Assets/My project/Fishing Scripts/UI/FishingStartTrigger.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 861cf89cbda384e4b9bf8207fcb6e487 \ No newline at end of file diff --git a/Assets/My project/Fonts/Pretendard-Bold SDF.asset b/Assets/My project/Fonts/Pretendard-Bold SDF.asset new file mode 100644 index 00000000..0046c46c --- /dev/null +++ b/Assets/My project/Fonts/Pretendard-Bold SDF.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2b9f0d6b6688ce01923ece2c37d4d2968d6d94d446b1f9ac8beaf9ecec92ae5 +size 33562646 diff --git a/Assets/My project/Fonts/Pretendard-Black SDF.asset.meta b/Assets/My project/Fonts/Pretendard-Bold SDF.asset.meta similarity index 64% rename from Assets/My project/Fonts/Pretendard-Black SDF.asset.meta rename to Assets/My project/Fonts/Pretendard-Bold SDF.asset.meta index e1c0a876..bc6a24e4 100644 --- a/Assets/My project/Fonts/Pretendard-Black SDF.asset.meta +++ b/Assets/My project/Fonts/Pretendard-Bold SDF.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 21ea34fc6d434e440882af6aa29c81c3 +guid: c7f713164da2d264997c747f190e6653 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 0 + mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/My project/fishhook scene.meta b/Assets/My project/fishhook scene.meta new file mode 100644 index 00000000..e604da30 --- /dev/null +++ b/Assets/My project/fishhook scene.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb2c790b464b7de46aae2abae1090127 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/My project/fishhook scene.unity b/Assets/My project/fishhook scene.unity index 70e9756d..7bad8c2b 100644 --- a/Assets/My project/fishhook scene.unity +++ b/Assets/My project/fishhook scene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc597fe373ac41742270b04d5e02c7db900781242ef07bbe6d0134a6350db18c -size 65495 +oid sha256:e39d525a5b6c302ecc4503a7b332f5fe9e90d9e85fdf85cdece32441ebb383a8 +size 878313 diff --git a/Assets/My project/fishhook scene/NavMesh-Terrain.asset b/Assets/My project/fishhook scene/NavMesh-Terrain.asset new file mode 100644 index 00000000..daf0147c --- /dev/null +++ b/Assets/My project/fishhook scene/NavMesh-Terrain.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cc17cb634f8471936bf042581a52e29a62177472d723c6bcc3b776471356c12 +size 7599792 diff --git a/Assets/My project/fishhook scene/NavMesh-Terrain.asset.meta b/Assets/My project/fishhook scene/NavMesh-Terrain.asset.meta new file mode 100644 index 00000000..3bcd2a13 --- /dev/null +++ b/Assets/My project/fishhook scene/NavMesh-Terrain.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52b638411302f9445a3b1e998f291209 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 23800000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset index 19f87263..625a1c4a 100644 --- a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset +++ b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06458142b1e806fbba1e415f22b2c262a80a8881a3ebb880f89a841f77f3eb3f -size 544626 +oid sha256:8dc6471d84975f90f9f65db979eb4b41da6f0d61c6b8b5b891e86f7123c11a10 +size 17480 diff --git a/Assets/XR/AndroidXR/AndroidXRSettingsInitializer b/Assets/XR/AndroidXR/AndroidXRSettingsInitializer index f9a9372d..32023f45 100644 --- a/Assets/XR/AndroidXR/AndroidXRSettingsInitializer +++ b/Assets/XR/AndroidXR/AndroidXRSettingsInitializer @@ -2,7 +2,7 @@ %TAG !u! tag:unity3d.com,2011: --- !u!114 &1 MonoBehaviour: - m_ObjectHideFlags: 53 + m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -11,5 +11,5 @@ MonoBehaviour: m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d7e9a0ba2b7f40ebbb3dad8385aa807b, type: 3} m_Name: - m_EditorClassIdentifier: Unity.XR.AndroidOpenXR.Editor::UnityEditor.XR.OpenXR.Features.Android.AndroidXRSettingsInitializer + m_EditorClassIdentifier: isInitialized: 0 diff --git a/Assets/Samples/XR Interaction Toolkit/3.4.1/Starter Assets/XRI Default Input Actions.inputactions b/Assets/XRI Default Input Actions.inputactions similarity index 97% rename from Assets/Samples/XR Interaction Toolkit/3.4.1/Starter Assets/XRI Default Input Actions.inputactions rename to Assets/XRI Default Input Actions.inputactions index 66a9ab11..dea57a9d 100644 --- a/Assets/Samples/XR Interaction Toolkit/3.4.1/Starter Assets/XRI Default Input Actions.inputactions +++ b/Assets/XRI Default Input Actions.inputactions @@ -1,4 +1,5 @@ { + "version": 1, "name": "XRI Default Input Actions", "maps": [ { @@ -3373,6 +3374,94 @@ "isPartOfComposite": true } ] + }, + { + "name": "Fishing", + "id": "3c6bb206-3104-4a53-bb96-176241ce078c", + "actions": [ + { + "name": "ReturnBobber", + "type": "Button", + "id": "9cdb56e8-00cd-48ec-9198-6c70a8d9fe39", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "CastBobber", + "type": "Button", + "id": "c85d2e74-550d-4a30-9a50-17d5daf11580", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "ReelHold", + "type": "Button", + "id": "796d924d-c49e-49a2-89c8-a3336b7faed2", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "SubmitFishing", + "type": "Button", + "id": "c45b8ecb-0e50-49f0-bc60-479385b0bf5f", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "", + "id": "deb6a7a2-8de5-46b1-812b-d24b20c907a2", + "path": "{RightHand}/secondaryButton", + "interactions": "", + "processors": "", + "groups": "", + "action": "ReturnBobber", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "22448257-ef2a-42bf-a6c0-66fad17ee5e8", + "path": "{RightHand}/primaryButton", + "interactions": "", + "processors": "", + "groups": "", + "action": "CastBobber", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "a6cfa3d8-bd52-4c0e-8ff2-414ab0f22663", + "path": "{LeftHand}/gripPressed", + "interactions": "", + "processors": "", + "groups": "", + "action": "ReelHold", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "f435cfcf-7a21-40e3-b066-c6bbfc42783c", + "path": "{RightHand}/triggerPressed", + "interactions": "", + "processors": "", + "groups": "", + "action": "SubmitFishing", + "isComposite": false, + "isPartOfComposite": false + } + ] } ], "controlSchemes": [] diff --git a/Assets/Samples/XR Interaction Toolkit/3.4.1/Starter Assets/XRI Default Input Actions.inputactions.meta b/Assets/XRI Default Input Actions.inputactions.meta similarity index 100% rename from Assets/Samples/XR Interaction Toolkit/3.4.1/Starter Assets/XRI Default Input Actions.inputactions.meta rename to Assets/XRI Default Input Actions.inputactions.meta diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index e5096487..637ba983 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da4b5eefc927f8b91bcf9e56a186d2b852f49d9cbe91d466638d26c79d6a83ce -size 411 +oid sha256:e8d4ffbba55f43de3c4c2454e262aa0d4d01351b23ec0462dee606021029f4b3 +size 483