Difference between "Interface Call" and "Interface Message"

Using Interfaces, you can use the Interface Message and the Interface Call node (I always use Message). However it would be good to know the difference between these two nodes.

For somebody who knows the answer, this is probably a pretty dumb Question, but I don’t and I can’t find any info on it (most likely because the difference is obvious).

So if anybody could enlighten me, it would be really great - Thank you!

1 Like

Sorry, but I don’t understand this.

If the Interface Call executes the Interface Message, why would I ever use Call instead of just use Message?

e.g.

why
Call->Message->Event

if I can
Message->Event

The Image you posted didn’t show up for me until now. However, neither the Image, nor the Video explains the Call node. It just shows the message node, but not the call one

interface call call the mesasage

see this video Blueprint Quickshot: Adding Interaction | 08 | v4.7 Tutorial Series | Unreal Engine - YouTube

the call is a local and the message you can call in another bp

3 Likes

Lot of people misunderstand what interfaces are for and think it’s basic mean of communication in blueprints, which is not. Intefaces are to relate unrelated classes with common functions and variables, connecting them with common type, an interface. You hold objects in variables and directly call function to them so interfaces are not needed for communication, people got misdirected because you need to cast the object to your type, but you can do that just once and store object in variable of it’s type so it is no need for casting. Interfaces makes easier to deal with different type of objects that do the same thing on same events, so you don’t need to check what exactly type it is to call right function with right “Target” input

BPs was missing one thing to complete that feature and that was interface variable type, where you can hold objects of common interface type (and seems like it been implemented recently since i dont remember that and seen people complain of lacking), previously you had simple calls which accept any type of object as “Target” and if target don’t have target function nothing happens thats why it is called “message”, but as you have interface type now you can directly call from interface type and only accept interface type as a “Target” so it is 100% guaranty that this object has a function you calling

So story whole short:

-“Interface Message” calls function to any type of object in hope it has interface and there functions implemented and if it has it calls it

-“Interface call” is of a call function directly from interface type, you need to cast object to interface because object won’t be accepted, since BP need to be sure that function is implemented here

So first is tolerant the 2nd is not. I would not supprice if Interface Message will be deprecated in future, since it was substitution of missing interface type, which now we have implemented.

To tell the truth i didn’t know interface type was implemented thats good news, it might fix in people head what Interface really is.

9 Likes

While I think your explanation makes sense and is a good summary of how to use interfaces, the documentation disagrees.

Like you said, messages are essentially automatic casting that can fail:

The functions of the Interface are executed through the use of Interface Message nodes, These look and act like regular Function Calls, except that they can fail silently if the target does not implement the Interface.

But it goes on to say that you should always use messages to call other objects.

It is important to note that the version listed beneath Call Function is a local version, intended only to be called within this Blueprint.

Possibly, this is to discourage people from casting immediately before calling?

Also, the local vs message image used in the documentation is misleading. While it’s true that the function call shows the local type when used locally, in 4.9.2 both node types show the interface name when used externally. Possibly, that functionality is newer than the documentation and we should just follow your advice.

1 Like

I think it is to discourage calling interface message when you calling local function

sorry for necro, but an important mini question about performance:

would it be better for performance if i don’t check if the object is implementing interface X before i message X on it, since the message process is tolerant and checking it itself inside?

Hmm not sure, you would need use profiler to check this, it probably check type on C++ side anyway then theoretically calling without checking would be a bit faster. If you don’t loop it should not make much difference either way

Thanks, i will report back with results if i ever manage to test it.

Interface Call is a local version, intended only to be called within this Blueprint.


Interface Messages is designed to call the function via the interface on other Blueprints implementing the same interface.

More info: https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces#callinginterfacefunctions

1 Like

are you sure about that?

You can call events from other blueprints just as well, using references.
i.e. Player (blueprint) can call “ITriggerable”(interface) gun’s event/function.