Download

structure for extending on a plugin

Hiya

I’m using a plugin for custom character movement. However I’m extending the plugin code to fit the needs of my project (such as spawning/attaching weapons and so on). I’ve added these custom actors and components to the game/source folder like usual. This setup/structure causes quite some trouble though. Compiling and hot reload only compiles the source folder, yet the plugin needs to be recompiled through the Modules window. This causes some weird states and crashes.
Sometimes the weapon actor isn’t spawned, or I get compile errors (false positives), and sometimes the engine simply crashes. I then have to remove the binaries folder from my project, before it’s back to normal.

This made me wonder what the best structure/workflow for extending on a plugin would be then (since it also gets quite messy this way).

I was thinking of adding derived versions of the plugin in the game/source folder, and only add the extended code in there (thus leaving the plugin code untouched). But I’m not sure if that’s actually the best method? And will it then reload correctly on recompiling source?

thanks!

-Frank