RealDocs

UBlueprintInstancedStructLibrary::IsInstancedStructValid

function Engine Blueprint Since 5.0
#include "Kismet/BlueprintInstancedStructLibrary.h"
Access: public Specifiers: staticBlueprintCallable

Description

Checks whether an FInstancedStruct currently holds a value, exposed to Blueprint as a branching "Is Valid" node.

Caveats & Gotchas

  • In Blueprint this displays as "Is Valid (Branch)" with ExpandEnumAsExecs — it produces Valid/NotValid exec pins rather than a boolean output pin.
  • From C++, calling this returns an EStructUtilsResult enum, not a bool — compare against EStructUtilsResult::Valid, or just call InstancedStruct.IsValid() directly instead.
  • There is a separate, differently-named IsValid_InstancedStruct function in the same header that returns a plain bool with DisplayName "Is Valid" — don't confuse the two when reading Blueprint graphs.

Signature

static EStructUtilsResult IsInstancedStructValid(UPARAM(Ref) const FInstancedStruct& InstancedStruct);

Parameters

Name Type Description Default
InstancedStruct const FInstancedStruct& Instanced struct to check.

Return Type

EStructUtilsResult

Example

Branch on whether an instanced struct has data C++
if (UBlueprintInstancedStructLibrary::IsInstancedStructValid(MyInstance) == EStructUtilsResult::Valid)
{
    // safe to read from MyInstance
}

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.