Beispiel #1
0
    private void SerializeConfigFile(FileConfig config)
    {
        string configFilePath = PlayerPrefs.GetString(localPathKey);
        string tempXml        = UnityPath.Combinate("temp.xml", UnityPath.AssetPath.Persistent);

        XmlEncoder.Serialize <FileConfig>(tempXml, config);
        XmlEncoder.Encode(tempXml, configFilePath);

        File.Delete(tempXml);
    }