void Start() { terrain.SetActive(false); forest.SetActive(false); MyJsonUtility.LoadData(out charactersDict, out characters, out dialogues); dialogueUI.OnAnswerSelected += OnAnswerSelected; dialogueUI.IntroStage += OnIntroStageChange; charactersUI.OnCharacterSelected += OnCharacterSelected; SubmitLogic.ScoresComputed += OnScoresComputed; currentCharacter = charactersDict["AI"]; dialogueUI.DisplayIntro(currentCharacter.CurrentDialogue); charactersUI.SetCharacters(characters); audioManager.PlayIntro(); }
private WordSet ToJason(WordSet wordset) { string s = JsonUtility.ToJson(wordset); Debug.Log(s.Length); string compressString = MyJsonUtility.CompressString(s); Debug.Log(compressString.Length); string decompressString = MyJsonUtility.DeCompressString(compressString); Debug.Log(decompressString.Length); WordSet newSet = new WordSet(); JsonUtility.FromJsonOverwrite(decompressString, newSet); return(newSet); }
// Start is called before the first frame update void Start() { dialogues = MyJsonUtility.LoadDialogues(); }