/// <summary>
 /// Loads the selected dialog and returns the text from it.
 /// </summary>
 /// <returns></returns>
 public static string GetDialog()
 {
     if (selectedDialog != null)
     {
         Debug.Log(dialogsList[0].name + " -- " + SelectedDialog.text);
         selectedDialog = dialogsList.Find(dialog => dialog.name == SelectedDialog.text);
         Debug.Log(selectedDialog);
         Debug.Log("abc " + selectedDialog.Content(selectedLanguage));
         return(selectedDialog.Content(selectedLanguage));
     }
     return("");
 }
 /// <summary>
 /// Loads the selected dialog and returns the text from it.
 /// </summary>
 /// <returns></returns>
 public static string GetDialog(int index)
 {
     if (selectedDialog != null)
     {
         return(selectedDialog.Content(index));
     }
     else
     {
         return("");
     }
 }
Ejemplo n.º 3
0
        void SetText()
        {
            //UnityEditor.EditorUtility.SetDirty(dialog); //Saving the scriptable wizard just to be sure

            textComponent.text = dialog.Content();
        }