public void Copy(PublishPlatformCollection other) { foreach (var obj in other.plats) { PublishPlatformSet info = new PublishPlatformSet(); info.Copy(obj); plats.Add(info); } }
/// <summary> /// 读取平台配置表 /// </summary> /// <returns></returns> public static PublishPlatformCollection ReadPlatformConfig() { try { string resFilePath = GetPublishConfigPath(); string str_text = File.ReadAllText(resFilePath); PublishPlatformCollection platform_coll = JsonUtility.FromJson <PublishPlatformCollection>(str_text); return(platform_coll); } catch (Exception e) { Log.Error("读取配置表错误:" + e.Message); return(null); } }
/// <summary> /// 写入配置表数据 /// </summary> public static void WritePlatformConfig(PublishPlatformCollection data) { string jsonStr = JsonUtility.ToJson(data); try { string resFilePath = GetPublishConfigPath(); using (FileStream resfs = new FileStream(resFilePath, FileMode.Create)) { using (StreamWriter resSw = new StreamWriter(resfs, System.Text.Encoding.UTF8)) { resSw.Write(jsonStr); } } } catch (Exception e) { Log.Error("保存配置表错误:" + e.Message); } }
public void ResetData() { m_CachePlatformInfo = new PublishCachePlatformSet(); m_CacheChannelInfo = new PublishCacheChannelSet(); m_PlatformConfig = PublishUtils.ReadPlatformConfig(); OrientationIndex = 3; RenderPathIndex = 2; GraphicsAPIAndIndex = 1; GraphicsAPIIOSIndex = 1; GraphicsAPIWinIndex = 1; GraphicsAPIWebIndex = 0; ScriptBackemdIndex = 1; NetLevelIndex = 1; AndroidDeviceIndex = 1; IOSDeviceIndex = 2; IOSSDKIndex = 0; IOSOptLevelIndex = 0; InstallLocationIndex = 2; MinAndroidSDK = 1; StripLevel = 3; }
public void Setup() { m_PlatformConfig = PublishUtils.ReadPlatformConfig(); }