1.对应数据类
public class ConfigInfo
{
public string ComputerIp;
public int ComputerUsePort;
public float Millisecond;
}
2.新建类定义字段属性
public static ConfigInfo Config { get; private set; }
3.读取转换
private void ReadConfig()
{
string conf = File.ReadAllText(string.Format("{0}/{1}", Application.streamingAssetsPath, "appconfig"));
Config = Serialize.FromJson<ConfigInfo>(conf);
}