Linking the octo localization system to the dialogue system

This commit is contained in:
2026-02-17 19:06:37 +01:00
parent 79da2e5722
commit ec89813b1b
62 changed files with 832 additions and 120 deletions
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using OctoCore.Localization;
namespace Unheimlich.Data.Dialogues
{
@@ -7,8 +8,8 @@ namespace Unheimlich.Data.Dialogues
public class DialogueConversation : ScriptableObject
{
[Header("Speaker Information")]
[Tooltip("Name of the speaker (common to all texts in this conversation)")]
public string SpeakerName;
[Tooltip("Localized name of the speaker (common to all texts in this conversation)")]
public OctoLocalizedTextData SpeakerName;
[Header("Display Mode")]
[Tooltip("Choose how to display dialogue text: World (3D space) or Screen (Canvas UI)")]
@@ -17,10 +18,14 @@ namespace Unheimlich.Data.Dialogues
[Header("Dialogue Flow")]
[Tooltip("Ordered list of dialogue nodes for this conversation")]
public List<DialogueNode> DialogueNodes = new List<DialogueNode>();
[Header("Localization")]
[Tooltip("Localization ID for speaker name (optional)")]
public string SpeakerNameLocalizationKey;
public string GetLocalizedSpeakerName()
{
if (SpeakerName != null)
return OctoLocalization.GetLocalizedText(SpeakerName);
return string.Empty;
}
public DialogueNode GetFirstNode()
{