Cast to a class that exists in another plugin?

I have two plugins. PluginOne contains a custom Actor class called ATick. This is spawned in game.

From PluginTwo, I need to find that Actor, and cast to the class.

In PluginTwo, I have added the PluginOne module name into the modules list of Build.cs.

I can include the header, and Intelsense does not complain at:

AActor* Ticker = getInEditor("Tick"); //function that searches and finds the Actor
ATick* node = Cast<ATick>(Ticker); 

When I try to build though, i get unresolved external symbol errors.

Do I need to link something else to use a class cross-plugin like this?
Or is there a different way to cast?


Hi, does your ATick class have the API macro?

class TICKMODULE_API ATick : public AActor
  // ...

Here, TICKMODULE would be the name of the module/plugin where ATick is defined. This internally adds the DLL export code needed for separate DLLs to be able to access each other’s definitions.
This solved this kind of issues when I encountered them.