You can also skip the second error by preventing blueprint interface implementation, although that could be shooting yourself in the foot for the future, but who knows
UINTERFACE(MinimalAPI, Meta=(CannotImplementInterfaceInBlueprint))
class UMyInterface ...
class IMyInterface ...
UFUNCTION(BlueprintCallable)
virtual bool CheckSomething() { return false; }
Thank you. this worked like a charm. I ended up going with your second suggestion, since I would like to keep the code as simple and readable as possible, but I’ll switch to the first approach as soon as I need it.
I have some follow-up questions, if you don’t mind:
Is the place where I’m specifying FORCEINLINE wrong, or should I simply not use FORCEINLINE at all in interfaces?
If I cannot use BlueprintPure, that means I need to plug something to the execution pin of the node. How could I do so if I want to use it inside the transition rule of a state machine?
And, as a side note, I think that the Meta=(CannotImplementInterfaceInBlueprint) specifier is equivalent to NotBlueprintable (UE 5.1.3 UHT suggested it to me, and it seems to work as well). Feel free to correct me if I’m wrong.
Generally for objects in UE4 we only use pointers so the virtual needs to be resolved (no inlining).
There might be a use case for Super calls though I’m not sure about that.
If you really need a pure call in this scenario I guess you could always add a pure static wrapper for some added clunkiness
The inline part makes all the sense, I don’t know why I didn’t think about that before. Removing FORCEINLINE it is then.
About the second part, is quite a bummer that interfaces have that lack of functionality. I know it’s a very specific scenario, but this kind of holes in interfaces functionality can be quite a pain in the long run. I will consider what options I have. Anyway, thank you for your help and your detailed answers, I really appreciate it.