Beispiel #1
0
    public static void BuildXCode(string channelName, bool isTest)
    {
        BuildTarget buildTarget = BuildTarget.iOS;

        PackageUtils.CopyAssetBundlesToStreamingAssets(buildTarget, channelName);
        LaunchAssetBundleServer.WriteAssetBundleServerURL(channelName);

        string buildFolder = Path.Combine(System.Environment.CurrentDirectory, XCodeOutputPath);

        buildFolder = Path.Combine(buildFolder, channelName);
        GameUtility.CheckDirAndCreateWhenNeeded(buildFolder);

        string iconPath = "Assets/Editor/icon/ios/{0}/{1}.png";

        string[]         iconSizes = new string[] { "180", "167", "152", "144", "120", "114", "76", "72", "57" };
        List <Texture2D> iconList  = new List <Texture2D>();

        for (int i = 0; i < iconSizes.Length; i++)
        {
            Texture2D texture = (Texture2D)AssetDatabase.LoadAssetAtPath(string.Format(iconPath, channelName, iconSizes[i]), typeof(Texture2D));
            iconList.Add(texture);
        }
        PlayerSettings.SetIconsForTargetGroup(BuildTargetGroup.iOS, iconList.ToArray());

        BaseChannel channel = ChannelManager.instance.CreateChannel(channelName);

        PlayerSettings.applicationIdentifier = channel.GetBundleID();
        PlayerSettings.productName           = channel.GetPackageName();
        PackageUtils.CheckAndAddSymbolIfNeeded(buildTarget, channelName);
        BuildPipeline.BuildPlayer(GetBuildScenes(), buildFolder, buildTarget, BuildOptions.None);
    }
 public static void GenXLuaCode(BuildTarget buildTarget)
 {
     PackageUtils.CheckAndAddSymbolIfNeeded(buildTarget, "HOTFIX_ENABLE");
     CSObjectWrapEditor.Generator.ClearAll();
     CSObjectWrapEditor.Generator.GenAll();
 }