Hi All I’m needing some extra in-depth explanation as to how to use Unreal’s Interfaces.
Currently I’ve used the following example: Interfaces in Unreal Engine | Unreal Engine 5.3 Documentation
I’ve made the ReactToTriggerInterface and ATrap classes/headers, and pasted in the appropriate code, however it won’t compile and generates errors:
\Source\SpaceProject/ATrap.h(25) : error C3668: 'AATrap::ReactToTrigger': method with override specifier 'override' did not override any base class methods
\Source\SpaceProject\ATrap.h(25) : error C3668: 'AATrap::ReactToTrigger': method with override specifier 'override' did not override any base class methods
I’ve spent a few hours on this, and managed to get a working interface following a different guide (A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums), but its quite different and doesn’t provide any base functionality from within the interface class which is what I’m after…
I’ll share what code I’m struggling with below;
As a workaround to using Interfaces, I could use a normal data driven class (UObject) with default methods I can implement and override…but then again whats the point of the interface if I do that right.
Any guidance is appreciated!
