private void Awake() { TextAsset textData = Resources.Load <TextAsset>("Text/textFilePath"); data = TextAssetTool.CreateCoordinateDictionary(textData.text); //data = new Dictionary<string[], Dictionary<float, CordPoint>>(); }
private void Awake() { Instance = this; textUIManager = new TextUIManager(gameObject.GetComponentInChildren <GroupTextUI>()); string[] tempData = TextAssetTool.ReadTextAssetData("Text/sampleDialogue"); foreach (string data in tempData) { string[] seperatedData = data.Split('-'); foreach (string datak in seperatedData) { Debug.Log(datak); } if (seperatedData.Length == 3) { DialogueData dialogueData = new DialogueData(seperatedData[0], TextAssetTool.ConvertNumberStringToInt(seperatedData[1], ':'), seperatedData[2].Split(';')); AddEventTextToDatabase(dialogueData.GetDialogueKey(), dialogueData); Debug.LogWarning(string.Format("The key {0} is added", dialogueData.GetDialogueKey())); } else { Debug.LogError("GO F**K URSELF"); } } Debug.LogWarning("TextDataManager initialized"); }
public async void WriteText(Dictionary <string[], Dictionary <float, CordPoint> > data) { StreamWriter textFile = new StreamWriter("C:\\Users\\Steven\\Desktop\\UI TEST PRACTICE\\Practicegame\\UART\\Assets\\Resources\\Text\\textFilePath.txt", false);//idk how to create an error check await textFile.WriteAsync(TextAssetTool.CreateStringDictionary(data)); textFile.Close(); Debug.LogWarning("Finished"); }
private void Awake() { Instance = this; wordData = TextAssetTool.ReadTextAssetData("Word/english"); if (wordData.Length > 0) { Debug.LogWarning("wordData has been initialized with " + wordData.Length + "words!"); } }