FSlateGameResources::GetOptionalBrush

Just like GetBrush, but returns DefaultBrush instead of the "missing brush" image when the resource is not found.

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Slate/SlateGameResources.h

Include

#include "Slate/SlateGameResources.h"

Source

/Engine/Source/Runtime/Engine/Private/Slate/SlateGameResources.cpp

Syntax

virtual const FSlateBrush * GetOptionalBrush
(
    const FName PropertyName,
    const ANSICHAR * Specifier,
    const FSlateBrush *const DefaultBrush
) const

Remarks

Just like GetBrush, but returns DefaultBrush instead of the "missing brush" image when the resource is not found.

Returns

an FSlateBrush property.

Parameters

Parameter

Description

PropertyName

Name of the property to get

Specifier

An optional string to append to the property name