无法加载模块:public_UE4插件与模块

模块需要依赖项目 一般是引用项目做上层逻辑
插件独立与项目 并不依赖于项目 一般用作单独的功能 逻辑 每一个插件里最少有一个模块

"Modules": [ //模块依赖 每一个插件内最少有一个模块
{
"Name": "Task", //模块名字
"Type": "Developer", // 模块类型
"LoadingPhase": "Default" //加载阶段
}
Type :: ↓
/**
* Environment that can load a module.
*/
namespace EHostType
{
enum Type
{
Runtime, //任何情况下都会加载
RuntimeNoCommandlet, //任何情况都会加载 但是不会加载命令
RuntimeAndProgram, //任何情况都会加载 小程序
CookedOnly, //
Developer, // 开发模式使用 打包不会调用
Editor, // 编辑器启动时加载
EditorNoCommandlet, //不加载命令
Program, //!< Program-only plugin type
ServerOnly,
ClientOnly,
// NOTE: If you add a new value, make sure to update the ToString() method below!
Max
};
加载阶段 ↓
/**
* Phase at which this module should be loaded during startup.
*/
namespace ELoadingPhase
{
enum Type
{
/** Loaded before the engine is fully initialized, immediately after the config system has been initialized. Necessary only for very low-level hooks */
PostConfigInit,
/** Loaded before coreUObject for setting up manual loading screens, used for our chunk patching system */
PreEarlyLoadingScreen,
/** Loaded before the engine is fully initialized for modules that need to hook into the loading screen before it triggers */
PreLoadingScreen,
/** Right before the default phase */
PreDefault,
/** Loaded at the default loading point during startup (during engine init, after game modules are loaded.) */
Default,
/** Right after the default phase */
PostDefault,
/** After the engine has been initialized */
PostEngineInit,
/** Do not automatically load this module */
None,
// NOTE: If you add a new value, make sure to update the ToString() method below!
Max
};
添加插件


.Build 链接
.Target 编译
项目内添加一个模块
在主模块的Target 添加 副模块名字 (副模块不能在引用主模块 会导致循环引用)

