ConversationUtility.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
using System.Text;
public static class ConversationUtility
{
public static void ResetConversationSimStatus(string conversationTitle)
{
var conversation = DialogueManager.masterDatabase.GetConversation(conversationTitle);
if (conversation == null)
{
Debug.LogError("Conversation not found: " + conversationTitle);
return;
}
var sb = new StringBuilder();
sb.AppendFormat("Conversation[{0}].Dialog = {{ ", conversation.id);
for (int i = 0; i < conversation.dialogueEntries.Count; i++)
{
var dialogueEntry = conversation.dialogueEntries[i];
sb.AppendFormat("[{0}]={{SimStatus=\"Untouched\"}},", dialogueEntry.id);
}
sb.Append('}');
Lua.Run(sb.ToString(), DialogueDebug.logInfo, true);
}
}