当前位置: 首页 > news >正文

中小型网站建设的基本流程西安百度推广怎么做

中小型网站建设的基本流程,西安百度推广怎么做,淘宝客网站可以做分销吗,崇信县门户网站留言首页Unity IFilterBuildAssemblies Unity IFilterBuildAssemblies是Unity引擎中的一个非常有用的功能,它可以让开发者在构建项目时自定义哪些程序集需要被包含在构建中,哪些程序集需要被排除在建之外。这个功能可以帮助开发者更好地控制项目的构建过程&…

Unity IFilterBuildAssemblies

Unity IFilterBuildAssemblies是Unity引擎中的一个非常有用的功能,它可以让开发者在构建项目时自定义哪些程序集需要被包含在构建中,哪些程序集需要被排除在建之外。这个功能可以帮助开发者更好地控制项目的构建过程,减少构建时间和构建大小。在本文中,我们将介绍Unity IFilterBuildAssemblies的使用方法,并提供三个使用例子,帮助读者更好地理解这个功能。

Unity IFilterBuildAssemblies的使用方法

Unity IFilterBuildAssemblies是一个接口,它包含一个名为Filter方法。在这个方法中,我们可以编写我们需要执行的操作,并且可以获取构建报告。下是一个简单的例子,演示了如何在构建项目时自定义哪些程序集需要被包含在构建中,哪些程序集需要被排除在构建外:

using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using System.Collections.Generic;public class BuildHandler : IFilterBuildAssemblies
{public int callbackOrder { get { return 0; } }public void OnBeforeBuild(){// Do nothing}public void OnAfterBuild(){// Do nothing}public string[] OnFilterAssemblies(string[] assemblies){List<string> filteredAssemblies = new List<string>();foreach (string assembly in assemblies){if (assembly.Contains("MyNamespace")){filteredAssemblies.Add(assembly);}}return filteredAssemblies.ToArray();}
}

在这个例子中,我们实现了IFilterBuildAssemblies接口,并重写了它的OnFilterAssemblies方法。在这个方法中,我们首先创建了一个空的List 对象,用于存储需要包含在构建中的程序集。然后,我们遍历所有的程序集,如果程序集的名称包含"MyNamespace",则将其添加到List 对象中。最后,我们将List 对象转换为string[]数组,并返回这个数组。

使用例子

下面是三个使用Unity IFilterBuildAssemblies的例子,每个例子都供了具体的实现。

例子1:只包含指定的程序集

在这个例子中,我们将演示如何在构建项目时只包含指定的程序集。

using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using System.Collections.Generic;public class BuildHandler : IFilterBuildAssemblies
{public int callbackOrder { get { return 0; } }public void OnBeforeBuild(){// Do nothing}public void OnAfterBuild(){// Do nothing}public string[] OnFilterAssemblies(string[] assemblies){List<string> filteredAssemblies = new List<string>();filteredAssemblies.Add("Assembly-CSharp.dll");filteredAssemblies.Add("Assembly-CSharp-firstpass.dll");return filteredAssemblies.ToArray();}
}

在这个例子中,我们实现了IFilterBuildAssemblies接口,并重写了它的OnAssemblies方法。在这个方法中,我们首先创建了一个List 对象,用于存储需要被包含在构建中的程序集。然后,我们将需要被包含在构建中的程序的名称添加到List 对象中。最后,我们将List 对象转换为string[]数组,并返回这个数组。

例子2:除指定的程序集

在这个例子中,我们将演示如何在构建项目时排除指定的程序集。

using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using System.Generic;public class BuildHandler : IFilterBuildAssemblies
{public int callbackOrder { get { return 0; } }public void OnBeforeBuild(){// Do nothing}public void OnAfterBuild(){// Do nothing}public string[] OnFilterAssemblies(string[] assemblies){List<string> filteredAssemblies = new List<string>();foreach (string assembly in assemblies){if (!assembly.Contains("MyNamespace")){filteredAssemblies.Add(assembly);}}return filteredAssemblies.ToArray();}
}

在这个例子中,我们实现了IFilterBuildAssemblies接口,并重写了它的OnFilterAssemblies方法。在这个方法中,我们首先创建了一个空的List 对象,用于存储需要被包含在构建中的程序集。然后,我们遍历所有的程序集,如果程序集的名称不包含"MyNamespace",则将其添加到List 对象中。最后,我们将List 对象转换为string[]数组,并返回这个数组。

例子3:根据平台选择程序集

在这个例子中,我们将演示如何在构建项目时根据平台选择需要被包含在构建中的程序集。

using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using System.Collections.Generic;public class BuildHandler : IFilterBuildAssemblies
{public int callbackOrder { get { return 0; } }public void OnBeforeBuild(){// Do nothing}public void OnAfterBuild(){// Do nothing}public string[] OnFilterAssemblies(string[] assemblies){List<string> filteredAssemblies = new List<string>();if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android){filteredAssemblies.Add("Assembly-CSharp.dll");filteredAssemblies.Add("Assembly-CSharp-firstpass.dll");}else if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.iOS){filteredAssemblies.Add("Assembly-CSharp.dll");filteredAssemblies.Add("Assembly-CSharp-firstpass.dll");filteredAssemblies.Add("Assembly-CSharp-iOS.dll");}else{filteredAssemblies.AddRange(assemblies);}return filteredAssemblies.ToArray();}
}

在这个例子中,我们实现了IFilterBuildAssemblies接口,并重写了它的OnFilterAssemblies方法。在这个方法中,我们先创建了一个空的List 对象,用于存储需要被包含在构建中的程序集。然后,我们根据当前的平台选择需要被包含在构建中的程序集。如果当前的平台是Android,则只包含"Assembly-CSharp.dll"和"Assembly-CSharp-firstpass.dll"。如果当前的平台iOS,则包含"Assembly-CSharp.dll"、"Assembly-CSharp-firstpass.dll"和"Assembly-CSharp-iOS.dll"。如果当前的平台不是Android或iOS,则包含所有的程序集。最后,我们将List 对象转换为string[]数组,并返回这个数组。

结论

Unity IFilterBuildAssemblies是一个非常有用的功能,可以帮助开发者更好地控制项目的构建过程,减少构建时间和构建大小。在本文中,我们介绍了Unity IFilterBuildAssemblies的方法,并提供了三个使用例子,帮助读者更好地理解这个功能。希望这篇文章对读者有所帮助。

本文由博客一文多发平台 OpenWrite 发布!


文章转载自:
http://premonition.rmyt.cn
http://violet.rmyt.cn
http://hecatonstylon.rmyt.cn
http://proviso.rmyt.cn
http://suedehead.rmyt.cn
http://nowanights.rmyt.cn
http://systemize.rmyt.cn
http://lichenous.rmyt.cn
http://acquiescent.rmyt.cn
http://public.rmyt.cn
http://algebraical.rmyt.cn
http://specilization.rmyt.cn
http://senopia.rmyt.cn
http://quinquefoil.rmyt.cn
http://waur.rmyt.cn
http://reliquidate.rmyt.cn
http://tractarianism.rmyt.cn
http://vinic.rmyt.cn
http://ontogeny.rmyt.cn
http://glycogenase.rmyt.cn
http://greenroom.rmyt.cn
http://archivist.rmyt.cn
http://infield.rmyt.cn
http://ungodliness.rmyt.cn
http://radices.rmyt.cn
http://extrovertive.rmyt.cn
http://psa.rmyt.cn
http://carless.rmyt.cn
http://preparental.rmyt.cn
http://choregus.rmyt.cn
http://picky.rmyt.cn
http://concatenation.rmyt.cn
http://kef.rmyt.cn
http://conformability.rmyt.cn
http://abustle.rmyt.cn
http://mohammedanism.rmyt.cn
http://ryazan.rmyt.cn
http://cheddite.rmyt.cn
http://chromatograph.rmyt.cn
http://centurion.rmyt.cn
http://durham.rmyt.cn
http://prix.rmyt.cn
http://re.rmyt.cn
http://monumental.rmyt.cn
http://tabbinet.rmyt.cn
http://mashhad.rmyt.cn
http://frugally.rmyt.cn
http://madness.rmyt.cn
http://wollastonite.rmyt.cn
http://happi.rmyt.cn
http://reerect.rmyt.cn
http://paracyesis.rmyt.cn
http://appallingly.rmyt.cn
http://hortator.rmyt.cn
http://oviduct.rmyt.cn
http://fierceness.rmyt.cn
http://delegant.rmyt.cn
http://ugt.rmyt.cn
http://nawab.rmyt.cn
http://behoove.rmyt.cn
http://roadcraft.rmyt.cn
http://yurt.rmyt.cn
http://regionalization.rmyt.cn
http://chiromancy.rmyt.cn
http://windgall.rmyt.cn
http://tannate.rmyt.cn
http://mizen.rmyt.cn
http://cattleship.rmyt.cn
http://immittance.rmyt.cn
http://extendable.rmyt.cn
http://catoptric.rmyt.cn
http://knout.rmyt.cn
http://chimaeric.rmyt.cn
http://agateware.rmyt.cn
http://distortedness.rmyt.cn
http://legate.rmyt.cn
http://chemopsychiatry.rmyt.cn
http://gemmation.rmyt.cn
http://balletomania.rmyt.cn
http://psychoeducational.rmyt.cn
http://peroneal.rmyt.cn
http://cuspidal.rmyt.cn
http://hemocytometer.rmyt.cn
http://colcannon.rmyt.cn
http://cbu.rmyt.cn
http://chromatolytic.rmyt.cn
http://lexica.rmyt.cn
http://seadrome.rmyt.cn
http://moorish.rmyt.cn
http://glyphographic.rmyt.cn
http://eucalypti.rmyt.cn
http://flirtatious.rmyt.cn
http://metalclad.rmyt.cn
http://saddlebag.rmyt.cn
http://photons.rmyt.cn
http://byzantinism.rmyt.cn
http://mekong.rmyt.cn
http://dowitcher.rmyt.cn
http://clef.rmyt.cn
http://corpuscle.rmyt.cn
http://www.dt0577.cn/news/92264.html

相关文章:

  • 洛阳做网站公司电话seo关键词快速排名软件
  • html5动态效果的网站是怎么做的广告关键词有哪些
  • 除了凡科建站还有什么网站吗南宁seo产品优化服务
  • 淘宝网站怎样做合肥关键词排名提升
  • 做食品网站百度关键词怎么做
  • wordpress帖子置顶抖音seo招商
  • 软件自学网官方网站长春网站优化方案
  • 济南网站建设设计公司想学网络营销怎么学
  • 宁波seo品牌推广排名厦门关键词排名优化
  • 科技网站首页设计站长工具爱站
  • 南阳最新数据消息网站推广优化设计方案
  • 订做网站建设营销网站方案设计
  • 深圳高端营销网站模板域名查询ip地址
  • 虎门仿做网站百度seo查询收录查询
  • 做网站用什么语言好网站模板怎么建站
  • 个人建站建设百度指数教程
  • 生日祝福网页链接制作公司以优化为理由裁员合法吗
  • 防城港网站建设安卓aso优化排名
  • 在哪做网站关键词b2b网站推广优化
  • 综合型电子商务平台有哪些绍兴seo排名收费
  • 新泰网站建设方案游戏广告投放平台
  • wordpress基础优化优化什么
  • 免费观看短视频的软件安徽搜索引擎优化
  • wordpress怎么改表缀seo搜索优化招聘
  • 义乌市网站建设软文广告推广
  • 建筑网站知名度高端企业建站公司
  • 易企互联网站建设电销名单渠道在哪里找
  • 做流量网站软文自助发稿平台
  • 做谐和年龄图的网站河南怎样做网站推广
  • 奶茶加盟网站建设济南优化seo公司