How to check Valid any Interface?

I can’t check?

You can call functions from interfaces directly in blueprints. If blueprint have interface implemented it will be called. If not then, nothing will happen.

I want to check InterfaceVar is None or exist object.

Well you can’t check like that for your interface var. By definition an interface is not a object but… well an interface.

What is inside of this variable? Is it an editable field which you can set from outside? If so with what do you want to fill it?

If you just want to check if it’s filled search for “Equal” and just leave the other reference empty. If you want to check if some actor is implementing it get that actor and search for “Does Implement Interface”.

If you need something else please just answer with a bit more information :slight_smile:

Cheers

1 Like

Ok. but why would want to know if class have interface ?
If you just want to distinguish classes by type, you can easily create derived class.

Interfaces are used to create contract, which means “I’m implementing these functions”, not the “I’m of this type”.

Anyway, If you really want to check for Interface there is function Does Implement Interface.

Another option is under Utilities there is To Object(Interface), and the you might be able, to check if interface is null.

I want to connect several types certain actors as linkedlist.
InterfaceVar is next actor.
And, I want to know, is this actor last or not.
(Sorry, I’m English noob.)

I resolved.
I created based actor and same base extended actor.
And, based actor declear next actor.
(Based actor is sounds like abstract.)
Thank you.

just simply convert interface to object and check is valid

1 Like