UUnrealEdEngine vs IModuleInterface

Hello all! I’m rewriting a plugin from scratch and was wondering, what is the difference between UUnrealEdEngine and IModuleInterface? I looked at Rama’s Victory Vertex Snap code and he uses UUnrealEdEngine, but Hamad uses IModuleInterface. I intend to create additional modes. In my original version, I had to constantly update my actors from a widget’s Tick function. Anyway to have my plugin constantly update in the editor? Will UUnrealEdEngine work? Or can I use both? Thanks! :slight_smile:

– Bump :smiley:

I think what you would want to use is IModuleInterface if you plan on distributing your feature as a plugin. Extension of UUnrealEdEngine is not something that multiple plugins could do simultaneously as it is inheritance based and the user of the extended class would need to modify their project’s ini files to specify that the engine should use that class when the editor is started up.

Hey! Thanks for the reply. I’ve setup my plugin so it uses IModuleInterface. How would I have my plugin constantly update in the editor using IModuleInterface? Is there something like a tick function? Thanks! :slight_smile:

You can inherit your C++ class from FTickableGameObject. That will automatically register you to be Ticked every frame in a runtime game. Remember to implement the three required methods (Tick, IsTickable, and GetStatId as per Tickable.h). If you need to get ticked while in the editor when the game isn’t running, you can override IsTickableInEditor too.