집씬으로 넘기기

This commit is contained in:
2026-07-14 16:34:20 +09:00
parent b87651b186
commit e0be196bbb
15 changed files with 213 additions and 20 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -45,4 +45,8 @@ public class DialogNode : ScriptableObject
[Header("Event")] [Header("Event")]
public string EventKey; // 비어있지 않으면 이 노드가 재생될 때 DialogPlayer가 같은 Key의 이벤트를 호출 public string EventKey; // 비어있지 않으면 이 노드가 재생될 때 DialogPlayer가 같은 Key의 이벤트를 호출
[Header("Story")]
[Tooltip("0이 아니면 이 노드 재생 시 화자(비우면 대화 주인 NPC)의 호감도를 이만큼 증감")]
public int Affection;
} }

View File

@@ -368,6 +368,13 @@ private async Awaitable PlayNode(DialogNode node)
RaiseNodeEvent(node.EventKey); // EventKey 있으면 매칭 이벤트 호출 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으로 복귀 // 전용 BGM: 설정돼 있으면 교체, 비어 있으면 기본 BGM으로 복귀
if (SoundManager.Instance != null) if (SoundManager.Instance != null)
{ {

View File

@@ -97,6 +97,7 @@ public override void OnImportAsset(AssetImportContext ctx)
dn.LookAtPlayer = GetInputPortValue<bool>(gn.GetInputPortByName(DialogLineNode.PORT_LOOKAT)); dn.LookAtPlayer = GetInputPortValue<bool>(gn.GetInputPortByName(DialogLineNode.PORT_LOOKAT));
dn.ForcePlayerLook = GetInputPortValue<bool>(gn.GetInputPortByName(DialogLineNode.PORT_FORCELOOK)); dn.ForcePlayerLook = GetInputPortValue<bool>(gn.GetInputPortByName(DialogLineNode.PORT_FORCELOOK));
dn.WaitForInput = GetInputPortValue<bool>(gn.GetInputPortByName(DialogLineNode.PORT_WAITINPUT)); dn.WaitForInput = GetInputPortValue<bool>(gn.GetInputPortByName(DialogLineNode.PORT_WAITINPUT));
dn.Affection = GetInputPortValue<int>(gn.GetInputPortByName(DialogLineNode.PORT_AFFECTION));
string eventKey = null; string eventKey = null;
line.GetNodeOptionByName(DialogLineNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey); line.GetNodeOptionByName(DialogLineNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey);
@@ -143,6 +144,7 @@ static void FillStagingNode(DialogStagingNode gn, DialogNode dn)
dn.LineDuration = GetInputPortValue<float>(gn.GetInputPortByName(DialogStagingNode.PORT_DURATION)); dn.LineDuration = GetInputPortValue<float>(gn.GetInputPortByName(DialogStagingNode.PORT_DURATION));
dn.LookAtPlayer = GetInputPortValue<bool>(gn.GetInputPortByName(DialogStagingNode.PORT_LOOKAT)); dn.LookAtPlayer = GetInputPortValue<bool>(gn.GetInputPortByName(DialogStagingNode.PORT_LOOKAT));
dn.ForcePlayerLook = GetInputPortValue<bool>(gn.GetInputPortByName(DialogStagingNode.PORT_FORCELOOK)); dn.ForcePlayerLook = GetInputPortValue<bool>(gn.GetInputPortByName(DialogStagingNode.PORT_FORCELOOK));
dn.Affection = GetInputPortValue<int>(gn.GetInputPortByName(DialogStagingNode.PORT_AFFECTION));
string eventKey = null; string eventKey = null;
gn.GetNodeOptionByName(DialogStagingNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey); gn.GetNodeOptionByName(DialogStagingNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey);

View File

@@ -27,6 +27,7 @@ internal class DialogLineNode : DialogGraphNode
public const string PORT_LOOKAT = "LookAtPlayer"; public const string PORT_LOOKAT = "LookAtPlayer";
public const string PORT_FORCELOOK = "ForcePlayerLook"; public const string PORT_FORCELOOK = "ForcePlayerLook";
public const string PORT_WAITINPUT = "WaitForInput"; public const string PORT_WAITINPUT = "WaitForInput";
public const string PORT_AFFECTION = "Affection";
public const string PORT_QUESTION = "ChoiceQuestion"; public const string PORT_QUESTION = "ChoiceQuestion";
public const string OPTION_CHOICE_COUNT = "ChoiceCount"; public const string OPTION_CHOICE_COUNT = "ChoiceCount";
@@ -74,6 +75,8 @@ protected override void OnDefinePorts(IPortDefinitionContext context)
context.AddInputPort<bool>(PORT_FORCELOOK).WithDisplayName("Force Player Look") context.AddInputPort<bool>(PORT_FORCELOOK).WithDisplayName("Force Player Look")
.WithTooltip("이 대사 시작 시 플레이어(카메라)가 화자를 바라보도록 강제 회전").Build(); .WithTooltip("이 대사 시작 시 플레이어(카메라)가 화자를 바라보도록 강제 회전").Build();
context.AddInputPort<bool>(PORT_WAITINPUT).WithDisplayName("Wait For Input").Build(); context.AddInputPort<bool>(PORT_WAITINPUT).WithDisplayName("Wait For Input").Build();
context.AddInputPort<int>(PORT_AFFECTION).WithDisplayName("Affection ±")
.WithTooltip("0이 아니면 이 대사 재생 시 화자(비우면 대화 주인 NPC)의 호감도를 이만큼 증감").Build();
int choiceCount = 0; int choiceCount = 0;
GetNodeOptionByName(OPTION_CHOICE_COUNT)?.TryGetValue(out choiceCount); GetNodeOptionByName(OPTION_CHOICE_COUNT)?.TryGetValue(out choiceCount);

View File

@@ -19,6 +19,7 @@ internal class DialogStagingNode : DialogGraphNode
public const string PORT_DURATION = "Duration"; public const string PORT_DURATION = "Duration";
public const string PORT_LOOKAT = "LookAtPlayer"; public const string PORT_LOOKAT = "LookAtPlayer";
public const string PORT_FORCELOOK = "ForcePlayerLook"; public const string PORT_FORCELOOK = "ForcePlayerLook";
public const string PORT_AFFECTION = "Affection";
public const string OPTION_EVENT_KEY = "EventKey"; public const string OPTION_EVENT_KEY = "EventKey";
@@ -48,6 +49,8 @@ protected override void OnDefinePorts(IPortDefinitionContext context)
.WithTooltip("대상 캐릭터가 플레이어를 바라봄").Build(); .WithTooltip("대상 캐릭터가 플레이어를 바라봄").Build();
context.AddInputPort<bool>(PORT_FORCELOOK).WithDisplayName("Force Player Look") context.AddInputPort<bool>(PORT_FORCELOOK).WithDisplayName("Force Player Look")
.WithTooltip("플레이어가 대상 캐릭터를 바라봄").Build(); .WithTooltip("플레이어가 대상 캐릭터를 바라봄").Build();
context.AddInputPort<int>(PORT_AFFECTION).WithDisplayName("Affection ±")
.WithTooltip("0이 아니면 이 연출 재생 시 대상(비우면 대화 주인 NPC)의 호감도를 이만큼 증감").Build();
AddExecOutput(context, EXEC_OUT, string.Empty); AddExecOutput(context, EXEC_OUT, string.Empty);
} }

View File

@@ -1,5 +1,6 @@
using System; using System;
using UnityEngine; using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
public class InputManager : MonoBehaviour, GameInput.IPlayerActions public class InputManager : MonoBehaviour, GameInput.IPlayerActions
@@ -13,6 +14,9 @@ public class InputManager : MonoBehaviour, GameInput.IPlayerActions
public event Action OnJump_Event; public event Action OnJump_Event;
public event Action OnDialogNext_Event; public event Action OnDialogNext_Event;
// 테스트용
[SerializeField] private UnityEvent _testEvents;
private void Awake() private void Awake()
{ {
if (Instance == null) if (Instance == null)
@@ -45,4 +49,10 @@ public void OnDialogNext(InputAction.CallbackContext ctx)
if (ctx.phase == InputActionPhase.Started) if (ctx.phase == InputActionPhase.Started)
OnDialogNext_Event?.Invoke(); OnDialogNext_Event?.Invoke();
} }
public void OnTestButton(InputAction.CallbackContext ctx)
{
if (ctx.phase == InputActionPhase.Started)
_testEvents?.Invoke();
}
} }

View File

@@ -3,7 +3,7 @@
using UnityEngine.Rendering; using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal; using UnityEngine.Rendering.Universal;
public class LocalManager : MonoBehaviour public class LocalManager : MonoBehaviour,ISceneInitializable
{ {
[SerializeField] private string _nextSceneName; [SerializeField] private string _nextSceneName;
[SerializeField] private AudioClip _caffebeneBGM; [SerializeField] private AudioClip _caffebeneBGM;
@@ -19,6 +19,9 @@ public class LocalManager : MonoBehaviour
[SerializeField] private Volume _globalVolume; [SerializeField] private Volume _globalVolume;
[SerializeField] private GameObject CaffebeneImgObj; [SerializeField] private GameObject CaffebeneImgObj;
// 이 씬 전용 스카이박스 (비우면 SceneLoadManager의 기본 스카이박스 사용)
[SerializeField] private Material _sceneSkybox;
public void NextScene(int delay) public void NextScene(int delay)
{ {
_ = Util.RunDelayed((float)delay,()=>SceneLoadManager.Instance.RequestSceneChange(_nextSceneName)); _ = Util.RunDelayed((float)delay,()=>SceneLoadManager.Instance.RequestSceneChange(_nextSceneName));
@@ -95,4 +98,13 @@ private async Awaitable FadeToGrayscale(float duration)
} }
_globalVolume.weight = 1f; _globalVolume.weight = 1f;
} }
// 씬 로드 시 이 씬 전용 스카이박스를 적용
// (SceneLoadManager가 기본 스카이박스를 깐 뒤에 호출되므로 그 위에 덮어쓴다)
public void OnSceneLoaded()
{
if (_sceneSkybox != null && SceneLoadManager.Instance != null)
SceneLoadManager.Instance.SetSceneSkybox(_sceneSkybox);
}
} }

View File

@@ -1,6 +1,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.Serialization;
using UnityEngine.XR.Interaction.Toolkit.Locomotion; using UnityEngine.XR.Interaction.Toolkit.Locomotion;
public class SceneLoadManager : MonoBehaviour public class SceneLoadManager : MonoBehaviour
@@ -11,8 +12,10 @@ public class SceneLoadManager : MonoBehaviour
[SerializeField] private Camera _loadingCam; [SerializeField] private Camera _loadingCam;
[SerializeField] private Transform _loadingCamTargetTransform; [SerializeField] private Transform _loadingCamTargetTransform;
[SerializeField] private LoadingScreen _loadingScreen; [SerializeField] private LoadingScreen _loadingScreen;
// 씬(LocalManager)이 전용 스카이박스를 지정하지 않았을 때 쓰는 기본 스카이박스
[SerializeField] private Material _sceneSkybox; // (FormerlySerializedAs: 프리팹에 _sceneSkybox로 저장돼 있던 연결을 유지)
[FormerlySerializedAs("_sceneSkybox")]
[SerializeField] private Material _defaultSceneSkybox;
[SerializeField] private Material _loadingSkybox; [SerializeField] private Material _loadingSkybox;
[SerializeField, Min(0f)] private float _skyboxFadeTime = 1f; [SerializeField, Min(0f)] private float _skyboxFadeTime = 1f;
@@ -25,6 +28,9 @@ public class SceneLoadManager : MonoBehaviour
private Material _runtimeSceneSkybox; private Material _runtimeSceneSkybox;
private Material _runtimeLoadingSkybox; private Material _runtimeLoadingSkybox;
// 씬 전환 시퀀스 진행 중 여부 — 이때 적용되는 새 스카이박스는 검은 상태로 시작해야 한다
private bool _isChangingScene;
private void Awake() private void Awake()
{ {
if (Instance == null) if (Instance == null)
@@ -36,16 +42,11 @@ private void Awake()
Destroy(gameObject); // 이미 인스턴스가 있으면 자신을 파괴 Destroy(gameObject); // 이미 인스턴스가 있으면 자신을 파괴
} }
if (_sceneSkybox != null)
_runtimeSceneSkybox = new Material(_sceneSkybox);
if (_loadingSkybox != null) if (_loadingSkybox != null)
_runtimeLoadingSkybox = new Material(_loadingSkybox); _runtimeLoadingSkybox = new Material(_loadingSkybox);
if (_runtimeSceneSkybox != null) // 씬용 스카이박스는 OnSceneLoaded → SetSceneSkybox에서 적용된다
{ // (기본 스카이박스를 깔고, 씬에 LocalManager가 있으면 씬 전용으로 덮어씀)
RenderSettings.skybox = _runtimeSceneSkybox;
DynamicGI.UpdateEnvironment();
}
} }
private void Start() private void Start()
@@ -75,6 +76,10 @@ private void Update()
// 씬이 로드되었을때 호출 // 씬이 로드되었을때 호출
private void OnSceneLoaded(Scene scene, LoadSceneMode mode) private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{ {
// 우선 기본 스카이박스를 적용 — 씬 전용 스카이박스가 있으면
// 아래 루프에서 그 씬의 LocalManager가 SetSceneSkybox로 덮어쓴다
SetSceneSkybox(null);
MonoBehaviour[] allObjs = FindObjectsByType<MonoBehaviour>(); MonoBehaviour[] allObjs = FindObjectsByType<MonoBehaviour>();
foreach (var obj in allObjs) 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) public async Awaitable FadeLoadingCanvas(bool isOut,float fadeTime)
{ {
float startAlpha = isOut ? 1f : 0f; float startAlpha = isOut ? 1f : 0f;
@@ -190,6 +213,8 @@ private async Awaitable SceneChange(string sceneName)
{ {
try try
{ {
_isChangingScene = true;
//로딩바 수치 0으로 설정 //로딩바 수치 0으로 설정
SetSceneLoadingProgressValue(0f); SetSceneLoadingProgressValue(0f);
@@ -276,5 +301,9 @@ private async Awaitable SceneChange(string sceneName)
{ {
Debug.Log("씬 전환 작업이 취소됨"); Debug.Log("씬 전환 작업이 취소됨");
} }
finally
{
_isChangingScene = false;
}
} }
} }

View File

@@ -4,7 +4,7 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Audio; using UnityEngine.Audio;
public class SoundManager : MonoBehaviour public class SoundManager : MonoBehaviour, ISceneInitializable
{ {
public static SoundManager Instance { get; private set; } 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() private void Initialize()
{ {
//BGM 소스 기본 설정 //BGM 소스 기본 설정

View File

@@ -300,7 +300,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
Hash: c01645bdd20ef14fe6d14014f59a9c49 Hash: c01645bdd20ef14fe6d14014f59a9c49
m_Version: 2 m_Version: 2
m_Position: {x: 180.505, y: 92.442505} m_Position: {x: 180.505, y: 96.442505}
m_Title: m_Title:
m_Tooltip: m_Tooltip:
m_NodePreviewModel: m_NodePreviewModel:
@@ -328,6 +328,7 @@ MonoBehaviour:
- SpeakerNameOverride - SpeakerNameOverride
- ForcePlayerLook - ForcePlayerLook
- HudAnchor - HudAnchor
- Affection
m_ValueList: m_ValueList:
- rid: 4848514365209968924 - rid: 4848514365209968924
- rid: 4848514365209968925 - rid: 4848514365209968925
@@ -349,6 +350,7 @@ MonoBehaviour:
- rid: 4848514453388656869 - rid: 4848514453388656869
- rid: 4848514453388656825 - rid: 4848514453388656825
- rid: 4848514455607443550 - rid: 4848514455607443550
- rid: 4848514548136411248
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -471,7 +473,7 @@ MonoBehaviour:
- rid: 4848514453388656660 - rid: 4848514453388656660
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule}
data: data:
m_Value: m_Value: 5
- rid: 4848514453388656661 - rid: 4848514453388656661
type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: UnityEditor.GraphToolkitModule} type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: UnityEditor.GraphToolkitModule}
data: data:
@@ -505,6 +507,7 @@ MonoBehaviour:
- SpeakerNameOverride - SpeakerNameOverride
- ForcePlayerLook - ForcePlayerLook
- HudAnchor - HudAnchor
- Affection
m_ValueList: m_ValueList:
- rid: 4848514453388656663 - rid: 4848514453388656663
- rid: 4848514453388656664 - rid: 4848514453388656664
@@ -521,6 +524,7 @@ MonoBehaviour:
- rid: 4848514453388656870 - rid: 4848514453388656870
- rid: 4848514453388656827 - rid: 4848514453388656827
- rid: 4848514455607443551 - rid: 4848514455607443551
- rid: 4848514548136411249
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -653,6 +657,7 @@ MonoBehaviour:
- SpeakerNameOverride - SpeakerNameOverride
- ForcePlayerLook - ForcePlayerLook
- HudAnchor - HudAnchor
- Affection
m_ValueList: m_ValueList:
- rid: 4848514453388656678 - rid: 4848514453388656678
- rid: 4848514453388656679 - rid: 4848514453388656679
@@ -669,6 +674,7 @@ MonoBehaviour:
- rid: 4848514453388656871 - rid: 4848514453388656871
- rid: 4848514453388656829 - rid: 4848514453388656829
- rid: 4848514455607443552 - rid: 4848514455607443552
- rid: 4848514548136411250
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -723,7 +729,7 @@ MonoBehaviour:
- rid: 4848514453388656679 - rid: 4848514453388656679
type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule}
data: data:
m_Value: m_Value: AffectionUp
- rid: 4848514453388656680 - rid: 4848514453388656680
type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule} type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: UnityEditor.GraphToolkitModule}
data: data:
@@ -801,6 +807,7 @@ MonoBehaviour:
- SpeakerNameOverride - SpeakerNameOverride
- ForcePlayerLook - ForcePlayerLook
- HudAnchor - HudAnchor
- Affection
m_ValueList: m_ValueList:
- rid: 4848514453388656693 - rid: 4848514453388656693
- rid: 4848514453388656694 - rid: 4848514453388656694
@@ -817,6 +824,7 @@ MonoBehaviour:
- rid: 4848514453388656872 - rid: 4848514453388656872
- rid: 4848514453388656831 - rid: 4848514453388656831
- rid: 4848514455607443553 - rid: 4848514455607443553
- rid: 4848514548136411251
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -949,6 +957,7 @@ MonoBehaviour:
- SpeakerNameOverride - SpeakerNameOverride
- ForcePlayerLook - ForcePlayerLook
- HudAnchor - HudAnchor
- Affection
m_ValueList: m_ValueList:
- rid: 4848514453388656708 - rid: 4848514453388656708
- rid: 4848514453388656709 - rid: 4848514453388656709
@@ -965,6 +974,7 @@ MonoBehaviour:
- rid: 4848514453388656873 - rid: 4848514453388656873
- rid: 4848514453388656833 - rid: 4848514453388656833
- rid: 4848514455607443554 - rid: 4848514455607443554
- rid: 4848514548136411252
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -1098,6 +1108,7 @@ MonoBehaviour:
- SpeakerNameOverride - SpeakerNameOverride
- ForcePlayerLook - ForcePlayerLook
- HudAnchor - HudAnchor
- Affection
m_ValueList: m_ValueList:
- rid: 4848514453388656723 - rid: 4848514453388656723
- rid: 4848514453388656724 - rid: 4848514453388656724
@@ -1114,6 +1125,7 @@ MonoBehaviour:
- rid: 4848514453388656874 - rid: 4848514453388656874
- rid: 4848514453388656835 - rid: 4848514453388656835
- rid: 4848514455607443555 - rid: 4848514455607443555
- rid: 4848514548136411253
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -1294,6 +1306,7 @@ MonoBehaviour:
- Duration - Duration
- LookAtPlayer - LookAtPlayer
- ForcePlayerLook - ForcePlayerLook
- Affection
m_ValueList: m_ValueList:
- rid: 4848514453388656889 - rid: 4848514453388656889
- rid: 4848514453388656890 - rid: 4848514453388656890
@@ -1304,6 +1317,7 @@ MonoBehaviour:
- rid: 4848514453388656895 - rid: 4848514453388656895
- rid: 4848514453388656896 - rid: 4848514453388656896
- rid: 4848514453388656897 - rid: 4848514453388656897
- rid: 4848514548136411254
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -1447,6 +1461,7 @@ MonoBehaviour:
- LookAtPlayer - LookAtPlayer
- ForcePlayerLook - ForcePlayerLook
- WaitForInput - WaitForInput
- Affection
m_ValueList: m_ValueList:
- rid: 4848514455607443558 - rid: 4848514455607443558
- rid: 4848514455607443559 - rid: 4848514455607443559
@@ -1463,6 +1478,7 @@ MonoBehaviour:
- rid: 4848514455607443570 - rid: 4848514455607443570
- rid: 4848514455607443571 - rid: 4848514455607443571
- rid: 4848514455607443572 - rid: 4848514455607443572
- rid: 4848514548136411255
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -1609,6 +1625,7 @@ MonoBehaviour:
- LookAtPlayer - LookAtPlayer
- ForcePlayerLook - ForcePlayerLook
- WaitForInput - WaitForInput
- Affection
m_ValueList: m_ValueList:
- rid: 4848514455607443613 - rid: 4848514455607443613
- rid: 4848514455607443614 - rid: 4848514455607443614
@@ -1625,6 +1642,7 @@ MonoBehaviour:
- rid: 4848514455607443625 - rid: 4848514455607443625
- rid: 4848514455607443626 - rid: 4848514455607443626
- rid: 4848514455607443627 - rid: 4848514455607443627
- rid: 4848514548136411256
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -1770,6 +1788,7 @@ MonoBehaviour:
- LookAtPlayer - LookAtPlayer
- ForcePlayerLook - ForcePlayerLook
- WaitForInput - WaitForInput
- Affection
m_ValueList: m_ValueList:
- rid: 4848514455607443631 - rid: 4848514455607443631
- rid: 4848514455607443632 - rid: 4848514455607443632
@@ -1786,6 +1805,7 @@ MonoBehaviour:
- rid: 4848514455607443643 - rid: 4848514455607443643
- rid: 4848514455607443644 - rid: 4848514455607443644
- rid: 4848514455607443645 - rid: 4848514455607443645
- rid: 4848514548136411257
m_InputPortInfos: m_InputPortInfos:
expandedPortsById: expandedPortsById:
m_KeyList: [] m_KeyList: []
@@ -1900,3 +1920,43 @@ MonoBehaviour:
- rid: 4848514455607443646 - rid: 4848514455607443646
type: {class: DialogLineNode, ns: DinoLove.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} type: {class: DialogLineNode, ns: DinoLove.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor}
data: 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

View File

@@ -109,6 +109,15 @@ public @GameInput()
""processors"": """", ""processors"": """",
""interactions"": """", ""interactions"": """",
""initialStateCheck"": false ""initialStateCheck"": false
},
{
""name"": ""TestButton"",
""type"": ""Button"",
""id"": ""3a07efb6-dbfa-4bf3-87f5-9d38882aa0f5"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
} }
], ],
""bindings"": [ ""bindings"": [
@@ -133,6 +142,17 @@ public @GameInput()
""action"": ""DialogNext"", ""action"": ""DialogNext"",
""isComposite"": false, ""isComposite"": false,
""isPartOfComposite"": false ""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""87535666-fb0b-40b2-a1f0-284d77e21458"",
""path"": ""<Keyboard>/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 = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true); m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
m_Player_DialogNext = m_Player.FindAction("DialogNext", throwIfNotFound: true); m_Player_DialogNext = m_Player.FindAction("DialogNext", throwIfNotFound: true);
m_Player_TestButton = m_Player.FindAction("TestButton", throwIfNotFound: true);
} }
~@GameInput() ~@GameInput()
@@ -225,6 +246,7 @@ public int FindBinding(InputBinding bindingMask, out InputAction action)
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>(); private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
private readonly InputAction m_Player_Jump; private readonly InputAction m_Player_Jump;
private readonly InputAction m_Player_DialogNext; private readonly InputAction m_Player_DialogNext;
private readonly InputAction m_Player_TestButton;
/// <summary> /// <summary>
/// Provides access to input actions defined in input action map "Player". /// Provides access to input actions defined in input action map "Player".
/// </summary> /// </summary>
@@ -245,6 +267,10 @@ public struct PlayerActions
/// </summary> /// </summary>
public InputAction @DialogNext => m_Wrapper.m_Player_DialogNext; public InputAction @DialogNext => m_Wrapper.m_Player_DialogNext;
/// <summary> /// <summary>
/// Provides access to the underlying input action "Player/TestButton".
/// </summary>
public InputAction @TestButton => m_Wrapper.m_Player_TestButton;
/// <summary>
/// Provides access to the underlying input action map instance. /// Provides access to the underlying input action map instance.
/// </summary> /// </summary>
public InputActionMap Get() { return m_Wrapper.m_Player; } public InputActionMap Get() { return m_Wrapper.m_Player; }
@@ -276,6 +302,9 @@ public void AddCallbacks(IPlayerActions instance)
@DialogNext.started += instance.OnDialogNext; @DialogNext.started += instance.OnDialogNext;
@DialogNext.performed += instance.OnDialogNext; @DialogNext.performed += instance.OnDialogNext;
@DialogNext.canceled += instance.OnDialogNext; @DialogNext.canceled += instance.OnDialogNext;
@TestButton.started += instance.OnTestButton;
@TestButton.performed += instance.OnTestButton;
@TestButton.canceled += instance.OnTestButton;
} }
/// <summary> /// <summary>
@@ -293,6 +322,9 @@ private void UnregisterCallbacks(IPlayerActions instance)
@DialogNext.started -= instance.OnDialogNext; @DialogNext.started -= instance.OnDialogNext;
@DialogNext.performed -= instance.OnDialogNext; @DialogNext.performed -= instance.OnDialogNext;
@DialogNext.canceled -= instance.OnDialogNext; @DialogNext.canceled -= instance.OnDialogNext;
@TestButton.started -= instance.OnTestButton;
@TestButton.performed -= instance.OnTestButton;
@TestButton.canceled -= instance.OnTestButton;
} }
/// <summary> /// <summary>
@@ -347,5 +379,12 @@ public interface IPlayerActions
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" /> /// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" /> /// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnDialogNext(InputAction.CallbackContext context); void OnDialogNext(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "TestButton" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnTestButton(InputAction.CallbackContext context);
} }
} }

View File

@@ -23,6 +23,15 @@
"processors": "", "processors": "",
"interactions": "", "interactions": "",
"initialStateCheck": false "initialStateCheck": false
},
{
"name": "TestButton",
"type": "Button",
"id": "3a07efb6-dbfa-4bf3-87f5-9d38882aa0f5",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
} }
], ],
"bindings": [ "bindings": [
@@ -47,6 +56,17 @@
"action": "DialogNext", "action": "DialogNext",
"isComposite": false, "isComposite": false,
"isPartOfComposite": false "isPartOfComposite": false
},
{
"name": "",
"id": "87535666-fb0b-40b2-a1f0-284d77e21458",
"path": "<Keyboard>/t",
"interactions": "",
"processors": "",
"groups": "",
"action": "TestButton",
"isComposite": false,
"isPartOfComposite": false
} }
] ]
} }