using UnityEngine; using Yarn.Unity; namespace AibisDream { public class InteractiveDialogController : MonoBehaviour { private const string InteractiveProj = "Interactive"; private DialogueRunner _interactiveRunner; private void Awake() { _interactiveRunner = GetComponentInChildren(); // 加载交互式对话Yarn项目 var yarnProject = Resources.Load($"Yarn/{InteractiveProj}/{InteractiveProj}"); _interactiveRunner.SetProject(yarnProject); } /// /// 进行交互式对话 /// /// 节点名 public void StartInteractiveTalk(string nodeName) { _interactiveRunner.StartDialogue(nodeName); } } }