コード例 #1
0
    public void LoadNet()
    {
        SaveNetData dat = LoadDat(dataPath);

        SetBrokerPrefs(dat.BrokerAdres, dat.BrokerPort);
        ipfiled.text   = dat.BrokerAdres;
        portfiled.text = dat.BrokerPort;
    }
コード例 #2
0
    static void SaveNetData(SaveNetData data, string path)
    {
        string jsonString = JsonUtility.ToJson(data);

        using (StreamWriter streamWriter = File.CreateText(path))
        {
            streamWriter.Write(jsonString);
        }
    }
コード例 #3
0
    public void ChangePrefs()
    {
        SetBrokerPrefs(ipfiled.text, portfiled.text);
        SaveNetData dat = new SaveNetData();

        dat.BrokerAdres = ipfiled.text;
        dat.BrokerPort  = portfiled.text;
        SaveNetData(dat, dataPath);
    }