From e0be196bbb75b2d6101a099c783afafcff95f50b Mon Sep 17 00:00:00 2001 From: nakjun Date: Tue, 14 Jul 2026 16:34:20 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=91=EC=94=AC=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=84=98=EA=B8=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/01_Scenes/Hischool_Chapter1.unity | 4 +- Assets/01_Scenes/MyHouse.unity | 4 +- .../Communication/Dialog/DialogNode.cs | 4 ++ .../Communication/Dialog/DialogPlayer.cs | 7 ++ .../GraphTool/Editor/DialogGraphImporter.cs | 2 + .../Dialog/GraphTool/Editor/DialogLineNode.cs | 3 + .../GraphTool/Editor/DialogStagingNode.cs | 3 + Assets/02_Scripts/Managers/InputManager.cs | 10 +++ Assets/02_Scripts/Managers/LocalManager.cs | 14 +++- .../02_Scripts/Managers/SceneLoadManager.cs | 47 ++++++++++--- Assets/02_Scripts/Managers/SoundManager.cs | 6 +- .../Chapter1/Chapter1_Carnotaurus4.dlg | 66 ++++++++++++++++++- Assets/99_Settings/Input/GameInput.cs | 39 +++++++++++ .../99_Settings/Input/GameInput.inputactions | 20 ++++++ .../XR/Settings/OpenXR Package Settings.asset | 4 +- 15 files changed, 213 insertions(+), 20 deletions(-) diff --git a/Assets/01_Scenes/Hischool_Chapter1.unity b/Assets/01_Scenes/Hischool_Chapter1.unity index eb55e6ea..683ab76c 100644 --- a/Assets/01_Scenes/Hischool_Chapter1.unity +++ b/Assets/01_Scenes/Hischool_Chapter1.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1af33d461bfcad7c9f89203baf4b59d51e2a3421f2471a0ae5184d43313a8e0 -size 4035391 +oid sha256:c84bfcd0f9d815d6c11ad85386c2013b5578544d2db9b43bc92160151d4ce8e4 +size 4040356 diff --git a/Assets/01_Scenes/MyHouse.unity b/Assets/01_Scenes/MyHouse.unity index 38837153..1ab0b5c5 100644 --- a/Assets/01_Scenes/MyHouse.unity +++ b/Assets/01_Scenes/MyHouse.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32311ca2db46ebcc0875e2b567a5dfebb0813d93cf10a78bed869911e0dcd517 -size 1323653 +oid sha256:2b326aac592af754083669e98cffe8de993429854fdbccdb00ff99d902afae5d +size 1291419 diff --git a/Assets/02_Scripts/Communication/Dialog/DialogNode.cs b/Assets/02_Scripts/Communication/Dialog/DialogNode.cs index 42d08cdf..3c79f9ec 100644 --- a/Assets/02_Scripts/Communication/Dialog/DialogNode.cs +++ b/Assets/02_Scripts/Communication/Dialog/DialogNode.cs @@ -45,4 +45,8 @@ public class DialogNode : ScriptableObject [Header("Event")] public string EventKey; // 비어있지 않으면 이 노드가 재생될 때 DialogPlayer가 같은 Key의 이벤트를 호출 + + [Header("Story")] + [Tooltip("0이 아니면 이 노드 재생 시 화자(비우면 대화 주인 NPC)의 호감도를 이만큼 증감")] + public int Affection; } diff --git a/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs b/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs index ba705447..090a4392 100644 --- a/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs +++ b/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs @@ -368,6 +368,13 @@ private async Awaitable PlayNode(DialogNode node) RaiseNodeEvent(node.EventKey); // EventKey 있으면 매칭 이벤트 호출 + // 호감도 증감 — 화자 기준, 화자가 비어 있으면 대화 주인 NPC + if (node.Affection != 0) + { + var affectionTarget = node.Speaker != null ? node.Speaker : _voice.Character; + StoryManager.Instance.AddAffection(affectionTarget, node.Affection); + } + // 전용 BGM: 설정돼 있으면 교체, 비어 있으면 기본 BGM으로 복귀 if (SoundManager.Instance != null) { diff --git a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs index 975a25bc..ddf0f01e 100644 --- a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs +++ b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs @@ -97,6 +97,7 @@ public override void OnImportAsset(AssetImportContext ctx) dn.LookAtPlayer = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_LOOKAT)); dn.ForcePlayerLook = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_FORCELOOK)); dn.WaitForInput = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_WAITINPUT)); + dn.Affection = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_AFFECTION)); string eventKey = null; line.GetNodeOptionByName(DialogLineNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey); @@ -143,6 +144,7 @@ static void FillStagingNode(DialogStagingNode gn, DialogNode dn) dn.LineDuration = GetInputPortValue(gn.GetInputPortByName(DialogStagingNode.PORT_DURATION)); dn.LookAtPlayer = GetInputPortValue(gn.GetInputPortByName(DialogStagingNode.PORT_LOOKAT)); dn.ForcePlayerLook = GetInputPortValue(gn.GetInputPortByName(DialogStagingNode.PORT_FORCELOOK)); + dn.Affection = GetInputPortValue(gn.GetInputPortByName(DialogStagingNode.PORT_AFFECTION)); string eventKey = null; gn.GetNodeOptionByName(DialogStagingNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey); diff --git a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs index a9966afa..9a1ebc2a 100644 --- a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs +++ b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs @@ -27,6 +27,7 @@ internal class DialogLineNode : DialogGraphNode public const string PORT_LOOKAT = "LookAtPlayer"; public const string PORT_FORCELOOK = "ForcePlayerLook"; public const string PORT_WAITINPUT = "WaitForInput"; + public const string PORT_AFFECTION = "Affection"; public const string PORT_QUESTION = "ChoiceQuestion"; public const string OPTION_CHOICE_COUNT = "ChoiceCount"; @@ -74,6 +75,8 @@ protected override void OnDefinePorts(IPortDefinitionContext context) context.AddInputPort(PORT_FORCELOOK).WithDisplayName("Force Player Look") .WithTooltip("이 대사 시작 시 플레이어(카메라)가 화자를 바라보도록 강제 회전").Build(); context.AddInputPort(PORT_WAITINPUT).WithDisplayName("Wait For Input").Build(); + context.AddInputPort(PORT_AFFECTION).WithDisplayName("Affection ±") + .WithTooltip("0이 아니면 이 대사 재생 시 화자(비우면 대화 주인 NPC)의 호감도를 이만큼 증감").Build(); int choiceCount = 0; GetNodeOptionByName(OPTION_CHOICE_COUNT)?.TryGetValue(out choiceCount); diff --git a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogStagingNode.cs b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogStagingNode.cs index a689911b..a0337aad 100644 --- a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogStagingNode.cs +++ b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogStagingNode.cs @@ -19,6 +19,7 @@ internal class DialogStagingNode : DialogGraphNode public const string PORT_DURATION = "Duration"; public const string PORT_LOOKAT = "LookAtPlayer"; public const string PORT_FORCELOOK = "ForcePlayerLook"; + public const string PORT_AFFECTION = "Affection"; public const string OPTION_EVENT_KEY = "EventKey"; @@ -48,6 +49,8 @@ protected override void OnDefinePorts(IPortDefinitionContext context) .WithTooltip("대상 캐릭터가 플레이어를 바라봄").Build(); context.AddInputPort(PORT_FORCELOOK).WithDisplayName("Force Player Look") .WithTooltip("플레이어가 대상 캐릭터를 바라봄").Build(); + context.AddInputPort(PORT_AFFECTION).WithDisplayName("Affection ±") + .WithTooltip("0이 아니면 이 연출 재생 시 대상(비우면 대화 주인 NPC)의 호감도를 이만큼 증감").Build(); AddExecOutput(context, EXEC_OUT, string.Empty); } diff --git a/Assets/02_Scripts/Managers/InputManager.cs b/Assets/02_Scripts/Managers/InputManager.cs index 45dd05af..4f6afe7b 100644 --- a/Assets/02_Scripts/Managers/InputManager.cs +++ b/Assets/02_Scripts/Managers/InputManager.cs @@ -1,5 +1,6 @@ using System; using UnityEngine; +using UnityEngine.Events; using UnityEngine.InputSystem; public class InputManager : MonoBehaviour, GameInput.IPlayerActions @@ -13,6 +14,9 @@ public class InputManager : MonoBehaviour, GameInput.IPlayerActions public event Action OnJump_Event; public event Action OnDialogNext_Event; + // 테스트용 + [SerializeField] private UnityEvent _testEvents; + private void Awake() { if (Instance == null) @@ -45,4 +49,10 @@ public void OnDialogNext(InputAction.CallbackContext ctx) if (ctx.phase == InputActionPhase.Started) OnDialogNext_Event?.Invoke(); } + + public void OnTestButton(InputAction.CallbackContext ctx) + { + if (ctx.phase == InputActionPhase.Started) + _testEvents?.Invoke(); + } } diff --git a/Assets/02_Scripts/Managers/LocalManager.cs b/Assets/02_Scripts/Managers/LocalManager.cs index 2e5dcd83..adc7eb58 100644 --- a/Assets/02_Scripts/Managers/LocalManager.cs +++ b/Assets/02_Scripts/Managers/LocalManager.cs @@ -3,7 +3,7 @@ using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; -public class LocalManager : MonoBehaviour +public class LocalManager : MonoBehaviour,ISceneInitializable { [SerializeField] private string _nextSceneName; [SerializeField] private AudioClip _caffebeneBGM; @@ -19,6 +19,9 @@ public class LocalManager : MonoBehaviour [SerializeField] private Volume _globalVolume; [SerializeField] private GameObject CaffebeneImgObj; + // 이 씬 전용 스카이박스 (비우면 SceneLoadManager의 기본 스카이박스 사용) + [SerializeField] private Material _sceneSkybox; + public void NextScene(int delay) { _ = Util.RunDelayed((float)delay,()=>SceneLoadManager.Instance.RequestSceneChange(_nextSceneName)); @@ -95,4 +98,13 @@ private async Awaitable FadeToGrayscale(float duration) } _globalVolume.weight = 1f; } + + // 씬 로드 시 이 씬 전용 스카이박스를 적용 + // (SceneLoadManager가 기본 스카이박스를 깐 뒤에 호출되므로 그 위에 덮어쓴다) + public void OnSceneLoaded() + { + if (_sceneSkybox != null && SceneLoadManager.Instance != null) + SceneLoadManager.Instance.SetSceneSkybox(_sceneSkybox); + } + } diff --git a/Assets/02_Scripts/Managers/SceneLoadManager.cs b/Assets/02_Scripts/Managers/SceneLoadManager.cs index 207d3962..e49e20f6 100644 --- a/Assets/02_Scripts/Managers/SceneLoadManager.cs +++ b/Assets/02_Scripts/Managers/SceneLoadManager.cs @@ -1,6 +1,7 @@ using System; using UnityEngine; using UnityEngine.SceneManagement; +using UnityEngine.Serialization; using UnityEngine.XR.Interaction.Toolkit.Locomotion; public class SceneLoadManager : MonoBehaviour @@ -11,8 +12,10 @@ public class SceneLoadManager : MonoBehaviour [SerializeField] private Camera _loadingCam; [SerializeField] private Transform _loadingCamTargetTransform; [SerializeField] private LoadingScreen _loadingScreen; - - [SerializeField] private Material _sceneSkybox; + // 씬(LocalManager)이 전용 스카이박스를 지정하지 않았을 때 쓰는 기본 스카이박스 + // (FormerlySerializedAs: 프리팹에 _sceneSkybox로 저장돼 있던 연결을 유지) + [FormerlySerializedAs("_sceneSkybox")] + [SerializeField] private Material _defaultSceneSkybox; [SerializeField] private Material _loadingSkybox; [SerializeField, Min(0f)] private float _skyboxFadeTime = 1f; @@ -25,6 +28,9 @@ public class SceneLoadManager : MonoBehaviour private Material _runtimeSceneSkybox; private Material _runtimeLoadingSkybox; + // 씬 전환 시퀀스 진행 중 여부 — 이때 적용되는 새 스카이박스는 검은 상태로 시작해야 한다 + private bool _isChangingScene; + private void Awake() { if (Instance == null) @@ -36,16 +42,11 @@ private void Awake() Destroy(gameObject); // 이미 인스턴스가 있으면 자신을 파괴 } - if (_sceneSkybox != null) - _runtimeSceneSkybox = new Material(_sceneSkybox); if (_loadingSkybox != null) _runtimeLoadingSkybox = new Material(_loadingSkybox); - if (_runtimeSceneSkybox != null) - { - RenderSettings.skybox = _runtimeSceneSkybox; - DynamicGI.UpdateEnvironment(); - } + // 씬용 스카이박스는 OnSceneLoaded → SetSceneSkybox에서 적용된다 + // (기본 스카이박스를 깔고, 씬에 LocalManager가 있으면 씬 전용으로 덮어씀) } private void Start() @@ -75,6 +76,10 @@ private void Update() // 씬이 로드되었을때 호출 private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { + // 우선 기본 스카이박스를 적용 — 씬 전용 스카이박스가 있으면 + // 아래 루프에서 그 씬의 LocalManager가 SetSceneSkybox로 덮어쓴다 + SetSceneSkybox(null); + MonoBehaviour[] allObjs = FindObjectsByType(); foreach (var obj in allObjs) @@ -87,6 +92,24 @@ private void OnSceneLoaded(Scene scene, LoadSceneMode mode) } } + // 현재 씬에서 쓸 스카이박스를 지정한다 (null이면 기본 스카이박스로). + // 페이드가 머티리얼 에셋 원본의 _Exposure를 오염시키지 않도록 항상 복사본을 만들어 쓴다. + public void SetSceneSkybox(Material skybox) + { + var source = skybox != null ? skybox : _defaultSceneSkybox; + if (source == null) return; + + if (_runtimeSceneSkybox != null) Destroy(_runtimeSceneSkybox); + _runtimeSceneSkybox = new Material(source); + + // 씬 전환 중이면 아직 어두워야 한다 — 마지막 페이드 인(0 → 기본 노출)이 밝혀준다 + if (_isChangingScene && _runtimeSceneSkybox.HasFloat("_Exposure")) + _runtimeSceneSkybox.SetFloat("_Exposure", 0f); + + RenderSettings.skybox = _runtimeSceneSkybox; + DynamicGI.UpdateEnvironment(); + } + public async Awaitable FadeLoadingCanvas(bool isOut,float fadeTime) { float startAlpha = isOut ? 1f : 0f; @@ -190,6 +213,8 @@ private async Awaitable SceneChange(string sceneName) { try { + _isChangingScene = true; + //로딩바 수치 0으로 설정 SetSceneLoadingProgressValue(0f); @@ -276,5 +301,9 @@ private async Awaitable SceneChange(string sceneName) { Debug.Log("씬 전환 작업이 취소됨"); } + finally + { + _isChangingScene = false; + } } } \ No newline at end of file diff --git a/Assets/02_Scripts/Managers/SoundManager.cs b/Assets/02_Scripts/Managers/SoundManager.cs index b2876283..782c7d15 100644 --- a/Assets/02_Scripts/Managers/SoundManager.cs +++ b/Assets/02_Scripts/Managers/SoundManager.cs @@ -4,7 +4,7 @@ using UnityEngine; using UnityEngine.Audio; -public class SoundManager : MonoBehaviour +public class SoundManager : MonoBehaviour, ISceneInitializable { public static SoundManager Instance { get; private set; } @@ -44,6 +44,10 @@ private void Awake() } } + // 씬이 바뀌면 이전 씬에서 남은 전용(Override) BGM을 정리한다 (ISceneInitializable). + // 새 씬의 SceneBgm.Start가 SetDefaultBGM으로 그 씬의 곡을 넘겨주면 그대로 재생된다. + public void OnSceneLoaded() => ClearOverrideBGM(); + private void Initialize() { //BGM 소스 기본 설정 diff --git a/Assets/07_Data/DialogGraph/Chapter1/Chapter1_Carnotaurus4.dlg b/Assets/07_Data/DialogGraph/Chapter1/Chapter1_Carnotaurus4.dlg index b560b8a4..816993e1 100644 --- a/Assets/07_Data/DialogGraph/Chapter1/Chapter1_Carnotaurus4.dlg +++ b/Assets/07_Data/DialogGraph/Chapter1/Chapter1_Carnotaurus4.dlg @@ -300,7 +300,7 @@ MonoBehaviour: serializedVersion: 2 Hash: c01645bdd20ef14fe6d14014f59a9c49 m_Version: 2 - m_Position: {x: 180.505, y: 92.442505} + m_Position: {x: 180.505, y: 96.442505} m_Title: m_Tooltip: m_NodePreviewModel: @@ -328,6 +328,7 @@ MonoBehaviour: - SpeakerNameOverride - ForcePlayerLook - HudAnchor + - Affection m_ValueList: - rid: 4848514365209968924 - rid: 4848514365209968925 @@ -349,6 +350,7 @@ MonoBehaviour: - rid: 4848514453388656869 - rid: 4848514453388656825 - rid: 4848514455607443550 + - rid: 4848514548136411248 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -471,7 +473,7 @@ MonoBehaviour: - rid: 4848514453388656660 type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} data: - m_Value: + m_Value: 5 - rid: 4848514453388656661 type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: UnityEditor.GraphToolkitModule} data: @@ -505,6 +507,7 @@ MonoBehaviour: - SpeakerNameOverride - ForcePlayerLook - HudAnchor + - Affection m_ValueList: - rid: 4848514453388656663 - rid: 4848514453388656664 @@ -521,6 +524,7 @@ MonoBehaviour: - rid: 4848514453388656870 - rid: 4848514453388656827 - rid: 4848514455607443551 + - rid: 4848514548136411249 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -653,6 +657,7 @@ MonoBehaviour: - SpeakerNameOverride - ForcePlayerLook - HudAnchor + - Affection m_ValueList: - rid: 4848514453388656678 - rid: 4848514453388656679 @@ -669,6 +674,7 @@ MonoBehaviour: - rid: 4848514453388656871 - rid: 4848514453388656829 - rid: 4848514455607443552 + - rid: 4848514548136411250 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -723,7 +729,7 @@ MonoBehaviour: - rid: 4848514453388656679 type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} data: - m_Value: + m_Value: AffectionUp - rid: 4848514453388656680 type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} data: @@ -801,6 +807,7 @@ MonoBehaviour: - SpeakerNameOverride - ForcePlayerLook - HudAnchor + - Affection m_ValueList: - rid: 4848514453388656693 - rid: 4848514453388656694 @@ -817,6 +824,7 @@ MonoBehaviour: - rid: 4848514453388656872 - rid: 4848514453388656831 - rid: 4848514455607443553 + - rid: 4848514548136411251 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -949,6 +957,7 @@ MonoBehaviour: - SpeakerNameOverride - ForcePlayerLook - HudAnchor + - Affection m_ValueList: - rid: 4848514453388656708 - rid: 4848514453388656709 @@ -965,6 +974,7 @@ MonoBehaviour: - rid: 4848514453388656873 - rid: 4848514453388656833 - rid: 4848514455607443554 + - rid: 4848514548136411252 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -1098,6 +1108,7 @@ MonoBehaviour: - SpeakerNameOverride - ForcePlayerLook - HudAnchor + - Affection m_ValueList: - rid: 4848514453388656723 - rid: 4848514453388656724 @@ -1114,6 +1125,7 @@ MonoBehaviour: - rid: 4848514453388656874 - rid: 4848514453388656835 - rid: 4848514455607443555 + - rid: 4848514548136411253 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -1294,6 +1306,7 @@ MonoBehaviour: - Duration - LookAtPlayer - ForcePlayerLook + - Affection m_ValueList: - rid: 4848514453388656889 - rid: 4848514453388656890 @@ -1304,6 +1317,7 @@ MonoBehaviour: - rid: 4848514453388656895 - rid: 4848514453388656896 - rid: 4848514453388656897 + - rid: 4848514548136411254 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -1447,6 +1461,7 @@ MonoBehaviour: - LookAtPlayer - ForcePlayerLook - WaitForInput + - Affection m_ValueList: - rid: 4848514455607443558 - rid: 4848514455607443559 @@ -1463,6 +1478,7 @@ MonoBehaviour: - rid: 4848514455607443570 - rid: 4848514455607443571 - rid: 4848514455607443572 + - rid: 4848514548136411255 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -1609,6 +1625,7 @@ MonoBehaviour: - LookAtPlayer - ForcePlayerLook - WaitForInput + - Affection m_ValueList: - rid: 4848514455607443613 - rid: 4848514455607443614 @@ -1625,6 +1642,7 @@ MonoBehaviour: - rid: 4848514455607443625 - rid: 4848514455607443626 - rid: 4848514455607443627 + - rid: 4848514548136411256 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -1770,6 +1788,7 @@ MonoBehaviour: - LookAtPlayer - ForcePlayerLook - WaitForInput + - Affection m_ValueList: - rid: 4848514455607443631 - rid: 4848514455607443632 @@ -1786,6 +1805,7 @@ MonoBehaviour: - rid: 4848514455607443643 - rid: 4848514455607443644 - rid: 4848514455607443645 + - rid: 4848514548136411257 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -1900,3 +1920,43 @@ MonoBehaviour: - rid: 4848514455607443646 type: {class: DialogLineNode, ns: DinoLove.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: + - rid: 4848514548136411248 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411249 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411250 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 5 + - rid: 4848514548136411251 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411252 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411253 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411254 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411255 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411256 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 + - rid: 4848514548136411257 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} + data: + m_Value: 0 diff --git a/Assets/99_Settings/Input/GameInput.cs b/Assets/99_Settings/Input/GameInput.cs index ebec0213..17d83558 100644 --- a/Assets/99_Settings/Input/GameInput.cs +++ b/Assets/99_Settings/Input/GameInput.cs @@ -109,6 +109,15 @@ public @GameInput() ""processors"": """", ""interactions"": """", ""initialStateCheck"": false + }, + { + ""name"": ""TestButton"", + ""type"": ""Button"", + ""id"": ""3a07efb6-dbfa-4bf3-87f5-9d38882aa0f5"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false } ], ""bindings"": [ @@ -133,6 +142,17 @@ public @GameInput() ""action"": ""DialogNext"", ""isComposite"": false, ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""87535666-fb0b-40b2-a1f0-284d77e21458"", + ""path"": ""/t"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""TestButton"", + ""isComposite"": false, + ""isPartOfComposite"": false } ] } @@ -143,6 +163,7 @@ public @GameInput() m_Player = asset.FindActionMap("Player", throwIfNotFound: true); m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true); m_Player_DialogNext = m_Player.FindAction("DialogNext", throwIfNotFound: true); + m_Player_TestButton = m_Player.FindAction("TestButton", throwIfNotFound: true); } ~@GameInput() @@ -225,6 +246,7 @@ public int FindBinding(InputBinding bindingMask, out InputAction action) private List m_PlayerActionsCallbackInterfaces = new List(); private readonly InputAction m_Player_Jump; private readonly InputAction m_Player_DialogNext; + private readonly InputAction m_Player_TestButton; /// /// Provides access to input actions defined in input action map "Player". /// @@ -245,6 +267,10 @@ public struct PlayerActions /// public InputAction @DialogNext => m_Wrapper.m_Player_DialogNext; /// + /// Provides access to the underlying input action "Player/TestButton". + /// + public InputAction @TestButton => m_Wrapper.m_Player_TestButton; + /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_Player; } @@ -276,6 +302,9 @@ public void AddCallbacks(IPlayerActions instance) @DialogNext.started += instance.OnDialogNext; @DialogNext.performed += instance.OnDialogNext; @DialogNext.canceled += instance.OnDialogNext; + @TestButton.started += instance.OnTestButton; + @TestButton.performed += instance.OnTestButton; + @TestButton.canceled += instance.OnTestButton; } /// @@ -293,6 +322,9 @@ private void UnregisterCallbacks(IPlayerActions instance) @DialogNext.started -= instance.OnDialogNext; @DialogNext.performed -= instance.OnDialogNext; @DialogNext.canceled -= instance.OnDialogNext; + @TestButton.started -= instance.OnTestButton; + @TestButton.performed -= instance.OnTestButton; + @TestButton.canceled -= instance.OnTestButton; } /// @@ -347,5 +379,12 @@ public interface IPlayerActions /// /// void OnDialogNext(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "TestButton" is either , or . + /// + /// + /// + /// + void OnTestButton(InputAction.CallbackContext context); } } diff --git a/Assets/99_Settings/Input/GameInput.inputactions b/Assets/99_Settings/Input/GameInput.inputactions index 02464605..2be47279 100644 --- a/Assets/99_Settings/Input/GameInput.inputactions +++ b/Assets/99_Settings/Input/GameInput.inputactions @@ -23,6 +23,15 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "TestButton", + "type": "Button", + "id": "3a07efb6-dbfa-4bf3-87f5-9d38882aa0f5", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -47,6 +56,17 @@ "action": "DialogNext", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "87535666-fb0b-40b2-a1f0-284d77e21458", + "path": "/t", + "interactions": "", + "processors": "", + "groups": "", + "action": "TestButton", + "isComposite": false, + "isPartOfComposite": false } ] } diff --git a/Assets/XR/Settings/OpenXR Package Settings.asset b/Assets/XR/Settings/OpenXR Package Settings.asset index 6ff44318..d12e88ea 100644 --- a/Assets/XR/Settings/OpenXR Package Settings.asset +++ b/Assets/XR/Settings/OpenXR Package Settings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb6d1fe05d730cacf6c6c09ac177176edf2092965300eb6267c847e586fe679d -size 128890 +oid sha256:a2b77a6790e5eb39641bcaa1336479182c4dca11501eee0f09fa6df3dd39f666 +size 131327