RealDocs

UBlueprintInstancedStructLibrary::Reset

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

Description

Clears an FInstancedStruct, optionally reinitializing it as a default-constructed instance of a new struct type.

Caveats & Gotchas

  • Calling with StructType left at its default (null) empties the instanced struct entirely — IsInstancedStructValid will return false afterward.
  • Passing a StructType discards whatever value was previously stored, replacing it with a fresh default-constructed instance rather than converting the old value.
  • This is inline in the header (defined directly in the class body) and simply forwards to FInstancedStruct::InitializeAs — calling it from C++ is equivalent to calling that directly.

Signature

static void Reset(UPARAM(Ref) FInstancedStruct& InstancedStruct, const UScriptStruct* StructType = nullptr);

Parameters

Name Type Description Default
InstancedStruct FInstancedStruct& Instanced struct to reset, passed by reference.
StructType const UScriptStruct* Struct type to reinitialize InstancedStruct as. If null, InstancedStruct is left empty/invalid. nullptr

Return Type

void

Example

Clear an instanced struct back to empty C++
FInstancedStruct MyInstance = FInstancedStruct::Make(FVector(1, 2, 3));
UBlueprintInstancedStructLibrary::Reset(MyInstance);
// MyInstance is now empty; IsInstancedStructValid(MyInstance) == false

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.