海淀天下城电子沙盘单机版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
768 B

4 years ago
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<string>(json);
}
}