# 使用ProjectLauncher打包出的patch包能否实现热更新操作

**URL:** <https://forums.unrealengine.com/t/projectlauncher-patch/443145>\
**Category:** Modding\
**Tags:** patch, unreal-engine, UE4, question\
**Created:** [February 11, 2019, 8:53am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145 "2019-02-11T08:53:46Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 11, 2019, 8:53am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/1 "2019-02-11T08:53:46Z")

</div>

通过ProjectLauncher是否能实现打包用于热更新的PAK呢，是用于patch的pak包有什么地方设置不一样么，会报错only staged builds can be paked

 ![268266-qq截图20190211164852.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/c/6dc6eba8ac58690e724daf1438cef08a3981b75d.png)

 ![268267-qq截图20190211164906.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/9/f49321b2baf9fde31fb2eced6762c7290b703667.png)

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 12, 2019, 2:01am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/2 "2019-02-12T02:01:40Z")

</div>

我是直接用DLC來做熱更  
把要熱更的Asset放到DLC  
需要更新就再打包一次讓玩家下載  
DLC分包也簡單

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 12, 2019, 3:04am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/3 "2019-02-12T03:04:36Z")

</div>

謝謝您給我提供思路，但是如果通過DLC來做熱更新的差異包會不會讓這個更新包顯得太大，在每次更新的時候一個主體也只能掛載一個DLC，會不會不太方便

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 12, 2019, 3:21am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/4 "2019-02-12T03:21:57Z")

</div>

DLC可以多個，也可以掛載多個，比如可以資料表跟美術分成兩包。  
就可以達成只更新資料表的效果。  
另一點我觀察到，DLC打包出來除了有Pak外，  
也會有Chunks，做增量下載時，看流量就只會下載差異的部份了。  
但這點我還沒完全確認。

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 12, 2019, 3:29am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/5 "2019-02-12T03:29:16Z")

</div>

emmmmDLC現在不是按照map來打包的么，怎麼來通過資源類型來打包自己想要的東西呢，不使用ProjectLauncher來打包么？

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 12, 2019, 3:34am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/6 "2019-02-12T03:34:44Z")

</div>

你說得沒錯，  
我是透過自己寫簡單的Actor來引用資源，  
然後建立比如說"DataTableLevel"這樣的Map，  
這場景遊戲中不使用，純粹是引用Asset打包用的。

實務上還會有些要解決，  
在DLC機制中，如果APK跟DLC都引用到一個Asset，  
他就只會出現在APK中，  
使用DLC做熱更，一開始引用關係就要確認清楚。

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 12, 2019, 7:12am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/7 "2019-02-12T07:12:10Z")

</div>

謝謝您的回答，我覺得按您的方式的確可以實現一定程度上的資源更新，但是在更新包大小以及更新的方式來講好像還是有一定的弊端，我嘗試使用[how to make patch](https://docs.unrealengine.com/en-us/Engine/Deployment/HowToCreatePatch)  
當中的方式來寫更新包，但是還是卡在這個only staged builds can be paked 錯誤上，我想問一下這種問題一般是在什麼情況下出現呢

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 12, 2019, 7:14am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/8 "2019-02-12T07:14:30Z")

</div>

[https://blog.ch-wind.com/ue4-patch-release-dlc/](https://blog.ch-wind.com/ue4-patch-release-dlc/)  
可以參考這篇 有提到你說的錯誤

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 12, 2019, 7:21am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/9 "2019-02-12T07:21:01Z")

</div>

hhhh我也是看著這篇做的，他有提到DLC模式下為啥出現這個問題，但是我在不勾選DLC的時候也會出現這個報錯，而且在取消勾選了without version的選項后還會出現這種報錯，這就非常詭異了

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 18, 2019, 7:33am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/10 "2019-02-18T07:33:10Z")

</div>

你好，这几天我有尝试通过DLC来进行热更新，但是DLC的打包中好像不能包含新的资源，如果要添加新资源的话仍然需要打包生成新的APK才行，这有什么办法来解决么，还是说我在生成的时候没有打什么勾？

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 19, 2019, 2:06am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/11 "2019-02-19T02:06:39Z")

</div>

可以檢查Cook的檔案來確認打包結果，APK就看Saved裡面的Cook資料夾，DLC就看Plugin裡面的Cook資料夾。

新的資源我測試是可以的，  
確認下DLC地圖有沒有引用到新素材，  
然後打包後再看有沒有Cook到新素材。

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 19, 2019, 3:55am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/12 "2019-02-19T03:55:33Z")

</div>

謝謝您的提示，我檢查Plugin下的Cook文件夾下是有烘焙到新的素材的，但是地圖中沒有顯示新的資源應該是前一個DLC沒有被取消掛載的緣故？我需要繼續測試DLC資源的引用。

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 19, 2019, 5:19am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/13 "2019-02-19T05:19:07Z")

</div>

你是使用MobilePatchingLibrary下載跟Mount嗎

我是有製作一個只有下載跟Mount功能的場景，  
如果一進去場景已經引用要更新的素材，  
已經載入記憶體後才Mount是沒有用的。

最好製作一個專門的下載場景，  
都下載完再進遊戲。

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 19, 2019, 8:14am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/14 "2019-02-19T08:14:49Z")

</div>

謝謝回答，我做了一個空的newWorld作為一開始的測試下載場景，然後更新其他地圖中的各種資源，現在對於模型和材質的導入都成功了，但是我以第一人稱射擊的那個案例項目作為一個MAP的時候，在DLC中修改人物CharacterMovement中的參數或者修改人物子彈的顏色，都沒有什麼效果，這個DLC是不能用來修改已有的actor中包含的參數么，還是不能拿來修改藍圖。

我使用的的確是MobilePatchingLibrary中的下載與Mount，為了保證一開始的APK與後面DLC中打包的MAP沒有關係，我也修改了項目設置中的Game Default Map為newWorld

---

<div class="post-metadata">

**Author:** ![crysyal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crysyal](https://forums.unrealengine.com/u/crysyal)\
**Post date:** [February 19, 2019, 9:12am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/15 "2019-02-19T09:12:54Z")

</div>

啊問題解決了，是因為在項目設置的Map&Modes里的Default Pawn Class 引用到了作為第一人稱人物的Pawn所以一直沒法修改人物中的相關屬性，如果將這個值改為None就可以進行修改了

---

<div class="post-metadata">

**Author:** ![FilterGame](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FilterGame](https://forums.unrealengine.com/u/FilterGame)\
**Post date:** [February 20, 2019, 2:07am UTC](https://forums.unrealengine.com/t/projectlauncher-patch/443145/16 "2019-02-20T02:07:24Z")

</div>

恭喜你 ＼(^ω^＼)
