RealDocs

UKismetGuidLibrary::Parse_StringToGuid

function Engine Blueprint Since unknown
#include "Kismet/KismetGuidLibrary.h"
Access: public Specifiers: staticBlueprintPureBlueprintThreadSafe

Description

Parses a string into a GUID, auto-detecting which of the standard EGuidFormats it's written in, and reports whether parsing succeeded.

Caveats & Gotchas

  • OutGuid is left in an unspecified/default state when parsing fails — always branch on Success rather than assuming OutGuid is valid afterward.
  • Accepts any of FGuid::Parse's supported formats (digits, digits-with-hyphens, braces, etc.), so it is more permissive than the single format Conv_GuidToString produces.

Signature

static void Parse_StringToGuid( const FString& GuidString, FGuid& OutGuid, bool& Success );

Parameters

Name Type Description Default
GuidString const FString& String to parse, in any of FGuid::Parse's supported formats.
OutGuid FGuid& Receives the parsed GUID on success. Left in an unspecified state on failure.
Success bool& Receives true if GuidString was successfully parsed, false otherwise.

Return Type

void

Example

Parse user or config input into a GUID C++
FGuid ParsedId;
bool bSuccess = false;
UKismetGuidLibrary::Parse_StringToGuid(TEXT("A1B2C3D4E5F6A7B8C9D0E1F2A3B4C5D6"), ParsedId, bSuccess);
if (bSuccess)
{
	// use ParsedId
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.