Add handling of speech errors

This commit is contained in:
Nadine Ganz 2025-08-06 16:17:00 +02:00
parent 97863be2c5
commit 0755ed60ac
15 changed files with 271689 additions and 982 deletions

View File

@ -23,13 +23,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.HANDMENU.SpeechButton")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Restart")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.SpeechButton")
BTC.Hide("GO.HANDMENU.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}
@ -67,7 +89,7 @@ Tree("05_Tutorial") {
BTC.SynthesizeText("Gut, jetzt testen wir aber mal dein Mikrofon. Wie heisst du eigentlich?")
BTC.SpeechOutputEnded()
BTC.Show("GO.ANIMATIONS.SpeechHint")
BTC.Show("GO.HINTS.SpeakHint")
BTC.AddPossbileSpeechIntent("Zugabteil-Tutorial-U-8")
BTC.StartSpeechIntentRecognition()
@ -89,7 +111,7 @@ Tree("05_Tutorial") {
BTC.ClearPossbileSpeechIntents()
}
}
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.SynthesizeText("Schön dich kennenzulernen!")
BTC.SpeechOutputEnded()
}
@ -98,14 +120,14 @@ Tree("05_Tutorial") {
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.SynthesizeText("Ich habe dich nicht verstanden. Sprich bitte deutlicher.")
BTC.SpeechOutputEnded()
BTC.Show("GO.ANIMATIONS.SpeechHint")
BTC.Show("GO.HINTS.SpeakHint")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
@ -125,7 +147,7 @@ Tree("05_Tutorial") {
BTC.ClearPossbileSpeechIntents()
}
}
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.SynthesizeText("Schön dich kennenzulernen!")
BTC.SpeechOutputEnded()
}
@ -134,7 +156,7 @@ Tree("05_Tutorial") {
Composite(Sequence) {
BTC.Wait(10)
BTC.CompareUserSpeechInputStarted(false)
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
@ -161,7 +183,7 @@ Tree("05_Tutorial") {
BTC.SetSpeechRecognitionLanguage("de-DE")
BTC.SetVoiceName("de-DE-SeraphinaMultilingualNeural")
BTC.Show("GO.ANIMATIONS.SpeechHint")
BTC.Show("GO.HINTS.SpeakHint")
BTC.AddPossbileSpeechIntent("Zugabteil-Tutorial-U-15")
BTC.AddPossbileSpeechIntent("Zugabteil-Tutorial-U-16")
@ -183,21 +205,21 @@ Tree("05_Tutorial") {
Composite(Sequence) {
BTC.CompareIntentID("Zugabteil-Tutorial-U-15")
BTC.ClearPossbileSpeechIntents()
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.SynthesizeText("Ah, Spaghetti mag ich auch!")
BTC.SpeechOutputEnded()
}
Composite(Sequence) {
BTC.CompareIntentID("Zugabteil-Tutorial-U-16")
BTC.ClearPossbileSpeechIntents()
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.SynthesizeText("Ah, Pizza mag ich auch!")
BTC.SpeechOutputEnded()
}
Composite(Sequence) {
BTC.CompareIntentID("Zugabteil-Tutorial-U-17")
BTC.ClearPossbileSpeechIntents()
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.SynthesizeText("Ah, Risotto mag ich auch!")
BTC.SpeechOutputEnded()
}
@ -207,7 +229,7 @@ Tree("05_Tutorial") {
// Selector 2: Fallback Button
Composite(Sequence) {
Composite(Marathon) {
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Show("GO.HANDMENU.SpeechButton")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Spaghetti")
BTC.Show("GO.HANDMENU.Option1Button")
@ -267,7 +289,7 @@ Tree("05_Tutorial") {
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.Hide("GO.ANIMATIONS.SpeechHint")
BTC.Hide("GO.HINTS.SpeakHint")
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()

View File

@ -37,13 +37,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.HANDMENU.SpeechButton")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Restart")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.SpeechButton")
BTC.Hide("GO.HANDMENU.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -21,13 +21,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.HANDMENU.SpeechButton")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Restart")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.SpeechButton")
BTC.Hide("GO.HANDMENU.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -13,9 +13,6 @@
Composite(Sequence) {
RunTree("22_Geschaeft_Story_A_Picknicken_Baeckerei_Intro")
//RunTree("22_Geschaeft_Story_A_Picknicken_Mitnehmen")
//RunTree("22_Geschaeft_Story_A_Picknicken_Dank_Einkauf")
//RunTree("22_Geschaeft_Story_A_Picknicken_Baeckerei_Outro")
}
}
@ -26,13 +23,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.GO.SpeechButton")
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.SpeechButton")
BTC.Hide("GO.GO.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -23,13 +23,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.GO.SpeechButton")
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.SpeechButton")
BTC.Hide("GO.GO.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -21,13 +21,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.HANDMENU.SpeechButton")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Restart")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.SpeechButton")
BTC.Hide("GO.HANDMENU.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -43,13 +43,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.GO.SpeechButton")
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.SpeechButton")
BTC.Hide("GO.GO.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -30,13 +30,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.GO.SpeechButton")
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.SpeechButton")
BTC.Hide("GO.GO.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -23,13 +23,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.GO.SpeechButton")
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.SpeechButton")
BTC.Hide("GO.GO.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -23,13 +23,35 @@
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Show("GO.HANDMENU.SpeechButton")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Restart")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.SpeechButton")
BTC.Hide("GO.HANDMENU.SpeechOptions")
Composite(Marathon) {
BTC.Hide("GO.HINTS.SpeakHint")
BTC.Hide("GO.HINTS.SitDownHint")
BTC.Hide("GO.HINTS.StandUpHint")
}
Composite(Selector) {
Composite(Sequence) {
BTC.CompareSpeechError("Rate limit is exceeded")
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Hold on")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Der SpeechService ist momentan nicht\nverfügbar. In 30 Sekunden geht es weiter.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
BTC.Wait(30)
}
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HINTS.SpeechErrorTitle", "text", "Fehler")
BTC.Set("TextMeshPro.HINTS.SpeechErrorText", "text", "Es besteht ein Problem mit der Internetverbindung.\nBringe das VR Headset bitte zu deiner Lehrperson.")
BTC.Show("GO.HINTS.SpeechErrorHint")
}
Decorator(Repeat) {
BTC.Wait(60)
}
}
}
}
}
}

View File

@ -10,6 +10,8 @@ using UnityEngine;
using UnityEngine.Video;
using MyBT;
using System.Linq;
using System.IO;
using System;
#if FMOD_AVAILABLE
using FMODUnity;
@ -18,6 +20,7 @@ using FMODUnity;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.SceneManagement;
[CustomEditor(typeof(BTC))]
public class BehaviourTreeControllerInspector : Editor {
public override void OnInspectorGUI() {
@ -1065,12 +1068,47 @@ public class BTC : MonoBehaviour {
{
if (_onErrorEventTriggered)
{
Task.SetSucceeded();
Debug.Log($"ERROR: Speech Service not working. Reason: {_speechErrorText}");
WriteErrorToLog(_speechErrorText);
_onErrorEventTriggered = false;
Task.SetSucceeded();
return;
}
}
[Task]
public void CompareSpeechError(string text)
{
if (Task.getState == NodeState.FirstRun)
{
if (_speechErrorText.Contains(text))
{
Task.SetSucceeded();
return;
}
else
{
Task.SetFailed();
return;
}
}
}
private void WriteErrorToLog(string errorText)
{
try
{
string logFilePath = Path.Combine(Application.persistentDataPath, "speech_errors.log");
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
// Format log entry
string logEntry = $"[{timestamp}] ERROR: {errorText}";
File.AppendAllText(logFilePath, logEntry + Environment.NewLine);
}
catch (Exception ex)
{
Debug.LogError($"Failed to write error to log file: {ex.Message}");
}
}
#endregion
#region Visited Stories Manager

View File

@ -58,6 +58,7 @@ public class NamedTextMeshPro : ComponentHandler {
public override void Set(NodeState nodeState, string key, string value) {
if (nodeState == NodeState.FirstRun) {
if (key == "text") {
value = value.Replace("\\n", "\n");
if (textMeshProUGuiComponent!=null)
textMeshProUGuiComponent.text = value;

View File

@ -333,7 +333,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2791925709092458573, guid: 533729b907ee1354f8dc3bca4ad67ab5, type: 3}
propertyPath: m_Enabled
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2855770860446126157, guid: 533729b907ee1354f8dc3bca4ad67ab5, type: 3}
propertyPath: m_Name

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff