Runtime・Editor両方のContentが含まれたPluginを有効にしたまま、Packagingする方法

Editor用のPluginを制作しています。
そのPluginでは、Runtime用のアセットの編集を自動化する、珍しくないと思う形のものです。
PluginにはContentが含まれており、Runtime用のMaterialとEditor用のEditorUtilityWdigetがあります。
このEditorUtilityWdigetは"PropertyEditor"モジュール内のSlateを利用しており、察しの通りCookすることができません。
しかし、アセットを編集するにあたって、Runtime用のMaterialへの参照が入ってしまっているため、Cookされてしまいます。(もちろん上記のSlateを使うコード部分でエラー)

参照を弱参照にしたり、Package設定の"Exclude editor content"をオンにしたりと手を打ちましたが、理解が足りていないため解決方法になっていません。

Runtime・Editor両方のContentが含まれたPluginを有効にしたまま、Packagingすることはできるのでしょうか。

Hey crosssoniky,

When creating a plugin. I always make two modules.

One is Editor. (Contains all my slate/Editor code.)
The other one is Runtime.(Contains Everything NON editor.)

304503-editormodules.png

304504-editormodules2.png

Thank you for answer, Rene.

I know module type for plugin code.
So, I made two module, too.
“M2MI_Widget” module has a slate code, and depends “PropertyEditor” module.
”M2MI” module has no code.

In content.png, “EUW_content”(EditorUtilityWidget BP) has the slate which contains SObjectPropertyEntryBox(“PropertyEditor” module).
But “EUW_content” references some materials for runtime.

So, I caught this error.

PackagingResults: Error: [Callstack] 0x00007ffe15c2287b UE4Editor-M2MI_Widget.dll!UMeshSelectWidget::UMeshSelectWidget() [F:\Projects\.....M2MI_Widget\Private\MeshSelectWidget.cpp:10]

MeshSelectWidget.cpp line:10

TSharedRef selector = SNew(SObjectPropertyEntryBox)

304506-content.png

304505-uplugin.png

Thank you for answer, Rene.

I know module type for plugin code.
So, I made two module, too.
“M2MI_Widget” module has a slate code, and depends “PropertyEditor” module.
”M2MI” module has no code.

In content.png, “EUW_content”(EditorUtilityWidget BP) has the slate which contains SObjectPropertyEntryBox(“PropertyEditor” module).
But “EUW_content” references some materials for runtime.

So, I caught this error.

PackagingResults: Error: [Callstack] 0x00007ffe15c2287b UE4Editor-M2MI_Widget.dll!UMeshSelectWidget::UMeshSelectWidget() [F:\Projects\.....M2MI_Widget\Private\MeshSelectWidget.cpp:10]

MeshSelectWidget.cpp line:10

TSharedRef selector = SNew(SObjectPropertyEntryBox)  

304506-content.png

304505-uplugin.png

Thank you for answer, Rene.

I know module type for plugin code.
So, I made two module, too.
“M2MI_Widget” module has a slate code, and depends “PropertyEditor” module.
”M2MI” module has no code.

In content.png, “EUW_content”(EditorUtilityWidget BP) has the slate which contains SObjectPropertyEntryBox(“PropertyEditor” module).
But “EUW_content” references some materials for runtime.

So, I caught this error.

PackagingResults: Error: [Callstack] 0x00007ffe15c2287b UE4Editor-M2MI_Widget.dll!UMeshSelectWidget::UMeshSelectWidget() [F:\Projects\.....M2MI_Widget\Private\MeshSelectWidget.cpp:10]

MeshSelectWidget.cpp line:10

TSharedRef selector = SNew(SObjectPropertyEntryBox)  

304506-content.png

304505-uplugin.png

I’m sorry that my comment flood in this thread…