差分cookを利用している環境で、BlueprintのConstruction Scriptに含まれるAdd Component系ノードの構成を変更した後、cookが以下のエラーで失敗することがあります。
ログ例:
LogCook: Error: Content is missing from cook. Source package referenced an object in target package but the object was stripped out of the target package when saved.
Source package: /Game/<Project>/Maps/<RootMap>/_Generated_/<GeneratedPackageName>
Target package: /Game/<Project>/Path/To/<BlueprintAsset>
Referenced object: /Game/<Project>/Path/To/<BlueprintAsset>.<BlueprintClass>:NODE_Add<CustomComponent>-0
同様のエラーが複数のgenerated packageから出ており、参照先オブジェクト名は以下のようなConstruction ScriptのAdd Componentノード由来と思われる名前です。
- NODE_Add<CustomComponent>-0
- NODE_Add<CustomComponent>-2
最終的には以下で失敗します。
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
こちらの推測:
差分cookにより、過去のgenerated package側に古いConstruction ScriptのAdd Componentノード由来のコンポーネントテンプレート参照が残っているように見えます。
一方で、変更後のBlueprint packageをcook保存する際には、その古いNODE_Add…オブジェクトが存在しない、またはstripされるため、参照検証で"Content is missing from cook"になっているのではないかと考えております。
暫定回避策:
現状、Saved/Cookedを削除した後に再度パッケージ作成を行い、エラーに対処している状態です。
確認させて頂きたい事:
1. 差分cookとBlueprint Construction ScriptのAdd Component系ノード変更の組み合わせで、このようなstale referenceが残ることは既知の制限でしょうか。
2. /<MapName>/_Generated_/以下のgenerated packageは、参照先BlueprintのConstruction Scriptのコンポーネント構成が変わった場合、自動的に無効化・再生成される想定でしょうか。
3. 差分cookを継続利用しつつ、この問題を避ける推奨運用はありますでしょうか。
4. Saved/Cooked全体を削除する以外に、影響を受けたgenerated/cooked packageだけを無効化するcookオプションやcommandletはありますでしょうか。
5. レベルに配置されるActor Blueprintでは、Construction Script内のAdd Component系ノードを避けた方がよろしいでしょうか。
[Attachment Removed]