UKismetSystemLibrary::IsValidInterface
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Checks whether an interface reference has a valid underlying object, for use with Blueprint interface function calls. Works for both natively and Blueprint-implemented interfaces.
Caveats & Gotchas
- • This checks that the underlying object exists, not that the object implements every function of the interface with meaningful logic.
- • Not marked ENGINE_API in the header, so it can't be called across DLL boundaries from external modules — call it from within Engine-linked code only.
Signature
static bool IsValidInterface(const FScriptInterface& Interface) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Interface | const FScriptInterface& | The interface reference to check. | — |
Return Type
bool Example
Guard an interface call C++
if (UKismetSystemLibrary::IsValidInterface(InteractableInterface))
{
IInteractable::Execute_Interact(Conv_InterfaceToObject(InteractableInterface), Instigator);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?