Esempio n. 1
0
    //[UnityEditor.MenuItem("Tools/bulid")]
    public static void BuildProjected()
    {
        Debug.LogError("生成AB");
        string assetName = Trans ? (int)currentCollection + "Trans" : (int)currentCollection + "";

        assetName += ".asset";
        BuildCollectionResInfo builfCfg = null;
        string buildCfgpath             = "Assets/YKFramwork/Editor/BuildAbInfo/Collections/"
                                          + assetName;

        builfCfg = AssetDatabase.LoadAssetAtPath <BuildCollectionResInfo>(buildCfgpath);
        if (builfCfg == null)
        {
            Debug.LogError("加载不到builfCfg" + buildCfgpath + "/ccc=" + currentCollection);
            return;
        }

        if (builfCfg)
        {
            SetIconAndBg(builfCfg);
            SetUmengXinXI(builfCfg);
            builfCfg.Build();
        }

        Debug.Log("生成ab完成");
        BuildAB.BuildResIni();
        Debug.Log("准备生成APK");
        //BuildAB.BuildAb();
        if (CurrenBuildTarget == BuildTargetGroup.Android)
        {
            BuildForAndroid(builfCfg);
        }
        else if (CurrenBuildTarget == BuildTargetGroup.iOS)
        {
            BuildForIos(builfCfg);
        }
        else if (CurrenBuildTarget == BuildTargetGroup.Standalone)
        {
        }
    }
Esempio n. 2
0
    //[UnityEditor.MenuItem("Tools/bulid")]
    public static void BuildProjected()
    {
        //AssetDatabase.FindAssets(currentCollection +"t:"+ BuildCollectionResInfo.)

        BuildCollectionResInfo builfCfg = BuildCollectionResInfo.Find((int)currentCollection);

        if (builfCfg == null)
        {
            Debug.LogError("加载不到builfCfg    " + currentCollection);
            return;
        }

        if (builfCfg)
        {
            builfCfg.Build();
            SetLocalGameCfg(builfCfg);
        }
        Debug.Log("生成ab完成");
        BuildAB.BuildResIni();
        Debug.Log("准备生成APK");
        EditorPrefs.SetInt(savecollection, (int)currentCollection);
        //BuildAB.BuildAb();
        BuildPlayer(builfCfg, CurrenBuildTarget);
    }