Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition
by John P. Doran, William Sherif, Stephen Whittle
How it works...
To make it possible to test this recipe in the Level Blueprint, we need to make the interface functions callable via Blueprint, so we need the BlueprintCallable specifier on our UFUNCTION.
However, in a UInterface, the compiler expects the interface to be implementable via both C++ and Blueprint by default. This conflicts with BlueprintCallable, which is merely saying that the function can be invoked from Blueprint, not that it can be overridden in it.
We can resolve this conflict by marking the interface as CannotImplementInterfaceInBlueprint. This enables the use of BlueprintCallable as our UFUNCTION specifier, rather than BlueprintImplementableEvent (which has extra overhead due to the extra code allowing for the function ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access