public void LoadGameFromFile(string fileName) { // string json = File.ReadAllText($"{Application.persistentDataPath}/{jsonFileName}.json"); string json = File.ReadAllText($"{Application.persistentDataPath}/{fileName}.json"); activePromptCollection = JsonUtility.FromJson <PromptCollection>(json); PopulateContainers(activePromptCollection.prompts); }
public void SavePromptCollection() { PromptCollection promptCollection = new PromptCollection(currentCollectionNameInput.text, prompts.ToArray(), DateTime.Now, DateTime.Now); string fileName = currentCollectionNameInput.text; string json = JsonUtility.ToJson(promptCollection); StreamWriter writer = File.CreateText($"{Application.persistentDataPath}/{fileName}.json"); writer.Write(json); writer.Close(); Debug.Log("prompt saved: " + json); }
public async Task StreamPingAsync(ulong tweetId, [Remainder] string title) { var prompts = new PromptCollection <StreamPingArguments>(this) .WithPrompt(Description, "Enter the message of the announcement"); }