Exemplo n.º 1
0
        /// <summary>
        /// set update urls
        /// </summary>
        /// <param name="url"></param>
        /// <param name="platform"></param>
        private static void ResetUrls(string url, BuildPlatform platform)
        {
            if (url == null || url == "")
            {
                return;
            }

            TextAsset downloadUrlText = (TextAsset)Resources.Load("Urls");
            BMUrls    _bmUrl          = JsonMapper.ToObject <BMUrls>(downloadUrlText.text);

            if (_bmUrl == null)
            {
                return;
            }

            if (platform == BuildPlatform.Android || platform == BuildPlatform.IOS || platform == BuildPlatform.Standalones)
            {
                _bmUrl.downloadUrls[platform.ToString()]       = url;
                _bmUrl.backupDownloadUrls[platform.ToString()] = url;
                _bmUrl.bundleTarget = platform;
                string content   = JsonFormatter.PrettyPrint(LitJson.JsonMapper.ToJson(_bmUrl));
                string file_path = "Assets/BundleManager/Resources/Urls" + GameHelper.SETTING_FILE_EXTENSION;
                CustomTool.FileSystem.ReplaceFile(file_path, content);
                UnityEditor.AssetDatabase.ImportAsset(file_path);
            }
        }
Exemplo n.º 2
0
 static public int get_offlineCache(IntPtr l)
 {
     try {
         BMUrls self = (BMUrls)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.offlineCache);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 3
0
 static public int get_downloadUrls(IntPtr l)
 {
     try {
         BMUrls self = (BMUrls)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.downloadUrls);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 4
0
 static public int get_useEditorTarget(IntPtr l)
 {
     try {
         BMUrls self = (BMUrls)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.useEditorTarget);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 5
0
 static public int get_bundleTarget(IntPtr l)
 {
     try {
         BMUrls self = (BMUrls)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.bundleTarget);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 6
0
 static public int constructor(IntPtr l)
 {
     try {
         BMUrls o;
         o = new BMUrls();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 7
0
 static public int set_downloadUrls(IntPtr l)
 {
     try {
         BMUrls self = (BMUrls)checkSelf(l);
         System.Collections.Generic.Dictionary <System.String, System.String> v;
         checkType(l, 2, out v);
         self.downloadUrls = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 8
0
 static public int SerializeToString_s(IntPtr l)
 {
     try {
         BMUrls a1;
         checkType(l, 1, out a1);
         var ret = BMUrls.SerializeToString(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 9
0
 static public int set_offlineCache(IntPtr l)
 {
     try {
         BMUrls         self = (BMUrls)checkSelf(l);
         System.Boolean v;
         checkType(l, 2, out v);
         self.offlineCache = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 10
0
 static public int set_downloadFromOutput(IntPtr l)
 {
     try {
         BMUrls         self = (BMUrls)checkSelf(l);
         System.Boolean v;
         checkType(l, 2, out v);
         self.downloadFromOutput = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 11
0
 static public int set_bundleTarget(IntPtr l)
 {
     try {
         BMUrls        self = (BMUrls)checkSelf(l);
         BuildPlatform v;
         checkEnum(l, 2, out v);
         self.bundleTarget = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 12
0
 static public int GetInterpretedOutputPath(IntPtr l)
 {
     try {
         BMUrls        self = (BMUrls)checkSelf(l);
         BuildPlatform a1;
         checkEnum(l, 2, out a1);
         var ret = self.GetInterpretedOutputPath(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 13
0
 static public int GetInterpretedDownloadUrl(IntPtr l)
 {
     try {
         BMUrls        self = (BMUrls)checkSelf(l);
         BuildPlatform a1;
         checkEnum(l, 2, out a1);
         System.Boolean a2;
         checkType(l, 3, out a2);
         var ret = self.GetInterpretedDownloadUrl(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 14
0
 public static string SerializeToString(BMUrls urls)
 {
     return(JsonMapper.ToJson(urls));
 }
Exemplo n.º 15
0
 public static string SerializeToString(BMUrls urls)
 {
     return JsonMapper.ToJson(urls);
 }