How to adapt a C++ interface to an Unreal interface?

Hi everyone. I have a bunch of third party pure C++ interfaces which code should not be modified. Which would be the best way to convert or adapt them into unreal interfaces. I am looking for a solution where my interfaces are included into the unreal project and extended by the unreal interfaces/classes.

Thank you for your time!

I’d just create a thin wrapper around the 3rd party interfaces.You could use a simple Pimpl pattern if you wanted.

 class U3rdPartyInterface : public UInterface
 class I3rdPartyInterface
     // Thin wrapper around 3rd party lib.
     void doWork() { Impl->doWork(); }
     void doMoreWork(int a, int b) { Impl->doMoreWork(a,b); }
     3rdPartyDLL* Impl; // Instantiated as part of the constructor for I3rdPartyInterface

There’s a good thread on Interfaces here that goes into why you need UInterface as well as a more traditional C++ interface pattern.

Thanks, I think this would do it. I’ll try it out.