// Start is called before the first frame update void Start() { dialogtree = new DialogImporter(); if (dialogfile != null) { dialogtree.ReadTree(dialogfile); } Interatables.Insert(0, gameObject); profileDict = profile.ToDictionary(); }
public void StartDialog(TextAsset dialog, List <GameObject> interactables = null) { gameObject.SetActive(true); dialogfile = dialog; Interatables = new List <GameObject>(interactables); if (Interatables == null) { Interatables = new List <GameObject>(); } Interatables.Insert(0, gameObject); dialogtree = new DialogImporter(); if (dialogfile != null) { dialogtree.ReadTree(dialogfile); } active = true; if (onStart != null) { onStart(); } }