UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShaderCompilerError Struct Reference

#include <ShaderCompilerCore.h>

Public Member Functions

 FShaderCompilerError (const TCHAR *InStrippedErrorMessage=TEXT(""))
 
 FShaderCompilerError (const TCHAR *InVirtualFilePath, const TCHAR *InLineString, const TCHAR *InStrippedErrorMessage)
 
 FShaderCompilerError (FString &&InStrippedErrorMessage)
 
 FShaderCompilerError (FString &&InStrippedErrorMessage, FString &&InHighlightedLine, FString &&InHighlightedLineMarker)
 
FString RENDERCORE_API GetErrorStringWithSourceLocation () const
 
FString RENDERCORE_API GetErrorStringWithLineMarker () const
 
FString RENDERCORE_API GetErrorString (bool bOmitLineMarker=false) const
 
bool HasLineMarker () const
 
bool RENDERCORE_API ExtractSourceLocation ()
 
FString RENDERCORE_API GetShaderSourceFilePath (TArray< FShaderCompilerError > *InOutErrors=nullptr) const
 

Static Public Member Functions

static void RENDERCORE_API ExtractSourceLocations (TArray< FShaderCompilerError > &InOutErrors)
 

Public Attributes

FString ErrorVirtualFilePath
 
FString ErrorLineString
 
FString StrippedErrorMessage
 
FString HighlightedLine
 
FString HighlightedLineMarker
 

Friends

FArchiveoperator<< (FArchive &Ar, FShaderCompilerError &Error)
 

Detailed Description

A shader compiler error or warning.

Constructor & Destructor Documentation

◆ FShaderCompilerError() [1/4]

FShaderCompilerError::FShaderCompilerError ( const TCHAR InStrippedErrorMessage = TEXT(""))
inline

◆ FShaderCompilerError() [2/4]

FShaderCompilerError::FShaderCompilerError ( const TCHAR InVirtualFilePath,
const TCHAR InLineString,
const TCHAR InStrippedErrorMessage 
)
inline

◆ FShaderCompilerError() [3/4]

FShaderCompilerError::FShaderCompilerError ( FString &&  InStrippedErrorMessage)
inline

◆ FShaderCompilerError() [4/4]

FShaderCompilerError::FShaderCompilerError ( FString &&  InStrippedErrorMessage,
FString &&  InHighlightedLine,
FString &&  InHighlightedLineMarker 
)
inline

Member Function Documentation

◆ ExtractSourceLocation()

bool FShaderCompilerError::ExtractSourceLocation ( )

Extracts the file path and source line from StrippedErrorMessage to ErrorVirtualFilePath and ErrorLineString.

◆ ExtractSourceLocations()

void FShaderCompilerError::ExtractSourceLocations ( TArray< FShaderCompilerError > &  InOutErrors)
static

Extracts the file path and source line for each error from the error message. Propagates highlighted line and marker to all errors pertaining to the same source location.

◆ GetErrorString()

FString FShaderCompilerError::GetErrorString ( bool  bOmitLineMarker = false) const

Returns the error message with source file and source line (if present).

◆ GetErrorStringWithLineMarker()

FString FShaderCompilerError::GetErrorStringWithLineMarker ( ) const

Returns the error message with source file and source line (if present), as well as a line marker separated with a LINE_TERMINATOR.

◆ GetErrorStringWithSourceLocation()

FString FShaderCompilerError::GetErrorStringWithSourceLocation ( ) const

Returns the error message with source file and source line (if present), as well as a line marker separated with a LINE_TERMINATOR.

◆ GetShaderSourceFilePath()

FString FShaderCompilerError::GetShaderSourceFilePath ( TArray< FShaderCompilerError > *  InOutErrors = nullptr) const

Returns the path of the underlying source file relative to the process base dir.

◆ HasLineMarker()

bool FShaderCompilerError::HasLineMarker ( ) const
inline

Returns true if this error message has a marker string for the highlighted source line where the error occurred. Example: /Engine/Private/MySourceFile.usf(120): error: undeclared identifier 'a' float b = a; ^

Friends And Related Symbol Documentation

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FShaderCompilerError Error 
)
friend

Member Data Documentation

◆ ErrorLineString

FString FShaderCompilerError::ErrorLineString

◆ ErrorVirtualFilePath

FString FShaderCompilerError::ErrorVirtualFilePath

◆ HighlightedLine

FString FShaderCompilerError::HighlightedLine

◆ HighlightedLineMarker

FString FShaderCompilerError::HighlightedLineMarker

◆ StrippedErrorMessage

FString FShaderCompilerError::StrippedErrorMessage

The documentation for this struct was generated from the following files: