|  |  | 
 |  |  | 
 | 
 |  |  |     public static string auditOutTime = string.Empty;
 | 
 |  |  | 
 | 
 |  |  |     public static string SDK_PLUGIN_PROJECT {
 | 
 |  |  |     public static string SDK_PLUGIN_PROJECT
 | 
 |  |  |     {
 | 
 |  |  |         get { return LocalSave.GetString("SDK_PROJECT_PATH"); }
 | 
 |  |  |         set { LocalSave.SetString("SDK_PROJECT_PATH", value); }
 | 
 |  |  |     }
 | 
 |  |  | 
 | 
 |  |  |     public static bool obfuscatorEnabled {
 | 
 |  |  |     public static bool obfuscatorEnabled
 | 
 |  |  |     {
 | 
 |  |  |         get { return LocalSave.GetBool("obfuscatorEnabled", false); }
 | 
 |  |  |         set { LocalSave.SetBool("obfuscatorEnabled", value); }
 | 
 |  |  |     }
 | 
 |  |  | 
 | 
 |  |  |     public static int AssetPrior {
 | 
 |  |  |     public static int AssetPrior
 | 
 |  |  |     {
 | 
 |  |  |         get { return LocalSave.GetInt("HalfAssetPrior", 1); }
 | 
 |  |  |         set { LocalSave.SetInt("HalfAssetPrior", value); }
 | 
 |  |  |     }
 | 
 |  |  | 
 |  |  |     public static void BuildApk(string _sdkPath, string _output, string _publisher, int _buildIndex, bool _development)
 | 
 |  |  |     {
 | 
 |  |  |         PreBuild(_publisher, _buildIndex);
 | 
 |  |  | 
 | 
 |  |  |         var auditTimeFile = StringUtility.Contact(Application.dataPath, Path.DirectorySeparatorChar, "Resources/Config/AuditTime.txt");
 | 
 |  |  |         if (File.Exists(auditTimeFile))
 | 
 |  |  |         {
 | 
 |  |  | 
 |  |  |             var apkName = StringUtility.Contact(_output, "/", versionName, "_", versionConfig.clientPackageFlag, "_v", versionConfig.m_Version, "_", _buildIndex, ".apk");
 | 
 |  |  |             BuildPipeline.BuildPlayer(baseLevels, apkName, BuildTarget.Android, BuildOptions.None);
 | 
 |  |  |         }
 | 
 |  |  | 
 | 
 |  |  |         FileUtil.MoveFileOrDirectory(Application.dataPath + "/Scripts/PocoSDK",
 | 
 |  |  |                                      Application.dataPath + "/Editor/PocoSDK");
 | 
 |  |  | 
 | 
 |  |  |         var _content = File.ReadAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs");
 | 
 |  |  |         int _start = _content.IndexOf("// ## PocoManager Start") + "// ## PocoManager Start".Length;
 | 
 |  |  |         int _end = _content.IndexOf("// ## PocoManager End");
 | 
 |  |  |         var _front = _content.Substring(0, _start);
 | 
 |  |  |         var _back = _content.Substring(_end);
 | 
 |  |  |         _content = _front + "\r\n// ## PocoManager\r\n" + _back;
 | 
 |  |  |         File.WriteAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs", _content);
 | 
 |  |  |     }
 | 
 |  |  | 
 | 
 |  |  |     public static void BuildIpa(string _sdkPath, string _publisher, int _buildIndex, bool _replace)
 | 
 |  |  | 
 |  |  |             PlayerSettings.allowedAutorotateToPortraitUpsideDown = false;
 | 
 |  |  |             PlayerSettings.bundleVersion = VersionConfig.GetVersionNumber(newVersionConfig.version).ToString();
 | 
 |  |  | 
 | 
 |  |  |             if (VersionConfig.Get().appId.Equals("test"))
 | 
 |  |  |             {
 | 
 |  |  |                 FileUtil.MoveFileOrDirectory(Application.dataPath + "/Editor/PocoSDK",
 | 
 |  |  |                                              Application.dataPath + "/Scripts/PocoSDK");
 | 
 |  |  | 
 | 
 |  |  |                 var _launchScript = File.ReadAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs");
 | 
 |  |  |                 if (_launchScript != null)
 | 
 |  |  |                 {
 | 
 |  |  |                     if (_launchScript.IndexOf("// ## PocoManager") == -1)
 | 
 |  |  |                     {
 | 
 |  |  |                         Debug.LogError("找不到替代字符串");
 | 
 |  |  |                     }
 | 
 |  |  |                     else
 | 
 |  |  |                     {
 | 
 |  |  |                         _launchScript.Replace("// ## PocoManager",
 | 
 |  |  |                         "if (VersionConfig.Get().appId.Equals(\"test\"))" +
 | 
 |  |  |                         "{" +
 | 
 |  |  |                             "SnxxzGame.Instance.gameObject.AddComponent<PocoManager>();" +
 | 
 |  |  |                         "}");
 | 
 |  |  | 
 | 
 |  |  |                         File.WriteAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs",
 | 
 |  |  |                                           _launchScript);
 | 
 |  |  |                     }
 | 
 |  |  |                 }
 | 
 |  |  |             }
 | 
 |  |  | 
 | 
 |  |  |             CSObjectWrapEditor.Generator.ClearAll();
 | 
 |  |  |             CSObjectWrapEditor.Generator.GenAll();
 | 
 |  |  |         }
 |