The new plugin is moved as a module on top of the original plugin
1: Move the folder under Source of the original plug-in
2: Modify three files.
<1> New plugin.build.cs Add the name of which plugin you want to move to
<2> The outermost plugin.uplugin, add the name of the module you added
<3> Modify the style.cpp file of the original plugin, FindPlugin The name behind writes the name of the plugin you moved to
3: Just recompile.
Custom attribute SLATE_ATTRIBUTE in Widget
.h
SLATE_BEGIN_ARGS(SSlAiMenuItemWidget)
{}//要放在这个BEGIN和END之间。
//SLATE_ATTRIBUTE(类型, 自定义属性名)
SLATE_ATTRIBUTE(TEXT, ItemText)
SLATE_END_ARGS()
.cpp
SNew(SSlAiMenuItemWidget)
.ItemText(TEXT("xxx"))//就会多个属性ItemText
Unloading Objects and Preventing Collection
例如:xx* xx;
xx = NewObject<xx>();
if(xx )
{
xx ->AddToRoot();
}
xx.ConditionalBeginDestroy();
xx= nullptr;