Closed handakim25 closed 7 months ago
UI가 Callback을 FindUI에서만 호출하고 있기 때문에 Callback을 제대로 설정하고 있지 않는다.
private void FindUI() { _dialogueUI = FindObjectOfType<DialogueUIController>(true); if(_dialogueUI != null) { _dialogueUI.OnNextDialogue += OnNextDialogueHandler; _dialogueUI.OnDialougeEnd += OnDialogueEndHandler; _dialogueUI.OnChoiceSelected += OnChoiceSelectedHandler; } }
DialogueUI를 Property로 변경하고 Property에 대입할 때 Callback을 등록하도록 수정. UI를 설정하는 부분이 StartDialogue에 있는 것도 안 맞는다. StartDialogue에서는 Dialogue 관련 로직만을 담을 것
bb8c1e2
증상
UI가 Callback을 FindUI에서만 호출하고 있기 때문에 Callback을 제대로 설정하고 있지 않는다.
해결 방법
DialogueUI를 Property로 변경하고 Property에 대입할 때 Callback을 등록하도록 수정. UI를 설정하는 부분이 StartDialogue에 있는 것도 안 맞는다. StartDialogue에서는 Dialogue 관련 로직만을 담을 것