using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using UnityEngine.UI; public class LoadTitle : MonoBehaviour { public Text text; // Start is called before the first frame update void Start() { //LoadTitlefunc(); text.text = TransformHelper.LoadJsonFromConfing("Title.json"); } // Update is called once per frame void Update() { } void LoadTitlefunc() { string json = null; string path = Path.Combine(Application.streamingAssetsPath, "Title.json"); if (File.Exists(path)) { json = File.ReadAllText(path); } text.text = JsonConvert.DeserializeObject(json); } }