Problem with module

Hi there, I have encountered a problem with engine modules when trying to run a level with standalone game option from the editor and was hoping someone would know more about it.

I have the following setup: Two engine modules - a runtime part and an editor part.

The runtime part defines some classes and their logic. The editor part defines a custom blueprint node which inherits from UK2Node and operates with one the classes from the runtime lib.

Now, when running the game with “Play in Editor” everything works fine and the custome node gets called. However, if I run the game with “Play in Standalone game” in the same level, the custom node does not get called. The warnings I get in the output log are:

Warning: Can’t find file ‘/Script/MyEditorModule’ LoadErrors: Info Failed to load /Script/MyEditorModule.K2Node_MyNode Referenced by EdGraphPin_5463

I figured it might be something to do with cooking - the Standalone game cooks the game on the fly. And indeed when i try to package my game i get the same Warnings and an Error that my Blueprint has an undefined node. Why does my node not compile when cooking?

Hi,

I ran in the same issue few days ago. Looking at some Engine plugins that create custom K2Nodes, for example the OnlineSubsystemUtils, you can see that the plugin is split in two modules. One has type Runtime, the other, named OnlineBlueprintSupport, has type Developer.

So I created a plugin which has 3 different modules, let’s call it SparkPlugin.
SparkPlugin is composed by:

  1. Spark-> Runtime Module
  2. SparkBlueprintSupport → Developer Module
  3. SparkEditor → Editor Module

Spark module contains runtime classes, such as Actors, Components and UObjects.
SparkBlueprintSupport contains custom UK2Node classes.
Finally SparkEditor module contains editor classes, such as Slate widget classes, DetailCustomization classes and so on.

I don’t know why, but it seems that Developer modules are loaded both in Development builds (and standalone instances created inside the Editor) and in Shipping builds, so I was able to call custom K2Nodes outside the Editor. Or at least the custom UK2Node classes in Developer modules are translated by the Blueprint compiler during the build phase.

I hope this helps you.