Possible to create plugin that derives classes from APawn?

I’ve been playing with plugins a little, trying to wrap my head around them, and I’ve run into an issue. I want to make a plugin that declares new classes inheriting from APawn (and presumably other objects that aren’t UObjects like the example plugin’s code). I’ve managed to make code that builds and runs in Rocket via Visual Studio, but if I try running Rocket not via Visual Studio, I get errors saying:

“Plugin ‘BlankPlugin’ failed to load because ‘BlankPlugin’ could not be found. This plugin’s functionality will not be available. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.”

“Plugin ‘UObjectPlugin’ failed to load because ‘UObjectPlugin’ could not be found. This plugin’s functionality will not be available. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.”

I’ve ensured the class previously called UMyPluginObject has been renamed to AMyPluginObject to meet the naming requirements for classes inheriting from APawn. As a later precaution, I’ve also modified UObjectPlugin.Build.cs to add “Engine” to PublicDependencyModuleNames, and UObjectPluginPrivatePCH.h to include Engine.h, and UObjectPluginClasses.h.

Is there something I’m missing here? The documentation and examples seem to suggest that the philosophy behind the plugin system is for them to inherit from either UObject or nothing, but I’m not sure why this is? That said, I’ve found the IKFoot plugin bundled with PlatformerGame in a previous version of the engine, and an class in it inherits from a class called FAnimNode_SkeletalControlBase that presumably used to be defined in a file called EngineAnimationNodeClasses.h. There’s also the Sagittarius plugin that worked in the previous version of Rocket, in which the ASagittarius class inherited from AActor. However, I can’t get either of those to work for the current version of Rocket (both are reported as too old for the current version).

Cheers!

Steve

I found a solution to my problem - I was building from Visual Studio with the “Debug Editor” configuration enabled. This creates a DLL for the plugin that ends in “-Win64-Debug.dll”, which Rocket won’t find when launched outside of Visual Studio. Changing configuration to “Development Editor” produces a correctly named DLL that Rocket does find.

I reproduced and resolved the issue by:

  • making a new project from the First Person Shooter (code) template,

  • copying across the example UObject plugin mentioned in my previous post,

  • changing the UMyPluginObject class to inherit from AActor (and later APawn) instead of UObject (in both MyPluginObject.h and MyPluginObject.cpp),

  • adding #include “Engine.h” just before the #include “MyPluginObject.generated.h” line in MyPluginObject.h.

  • including “Engine” as a Public Dependency Module Name in UObjectPlugin.Build.cs,

  • compiling the plugin with “Debug Editor” (which produced the error after running Rocket outside of VS) and later “Development Editor” (which resolved it after running Rocket outside of VS).