# Android 打Patch包生成shader代码的问题

**URL:** <https://forums.unrealengine.com/t/android-patch-shader/471843>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, question\
**Created:** [September 24, 2020, 5:54am UTC](https://forums.unrealengine.com/t/android-patch-shader/471843 "2020-09-24T05:54:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PW.RD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PW.RD](https://forums.unrealengine.com/u/PW.RD)\
**Post date:** [September 24, 2020, 5:54am UTC](https://forums.unrealengine.com/t/android-patch-shader/471843/1 "2020-09-24T05:54:08Z")

</div>

我们在打Patch包的时候遇到一个问题，在IOS上打的Patch包只有10MB左右，相同的资源和代码 ，在打android patch包的时候差不多有100MB。我查看了下发现是IOS的patch包shader比android的少，而且android是把完整的.ushadercode打进了patch包中了。所以会比ios多很多。如何让android只把差异的shader打进patch包中？

---

<div class="post-metadata">

**Author:** ![Jone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jone](https://forums.unrealengine.com/u/Jone)\
**Post date:** [March 25, 2021, 5:58am UTC](https://forums.unrealengine.com/t/android-patch-shader/471843/2 "2021-03-25T05:58:22Z")

</div>

你好，近期我也在看shader code补丁的问题，知乎上有位大佬提到过可以使用引擎提供的FShaderCodeLibrary::CreatePatchLibrary来做shader补丁，详情请看：[https://zhuanlan.zhihu.com/p/357428858](https://zhuanlan.zhihu.com/p/357428858)
