using System; using UnityEngine; namespace Jovian.EncounterSystem { /// Looks up in the library passed to ; falls back to . [Serializable] public struct DialogLineRef { public string id; [TextArea(2, 6)] public string inlineText; public string Resolve(DialogLineLibrary library) { if(library != null && !string.IsNullOrEmpty(id)) { var text = library.Resolve(id); if(!string.IsNullOrEmpty(text)) { return text; } } return inlineText; } } }