FSlateGameResources::New

Create a new Slate resource set that is scoped to the ScopeToDirectory.

Windows
MacOS
Linux

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

static TSharedRef< FSlateGameResources > New
(
    const FName & InStyleSetName,
    const FString & ScopeToDirectory,
    const FString & InBasePath
)

Remarks

Create a new Slate resource set that is scoped to the ScopeToDirectory.

All paths will be formed as InBasePath + "/" + AssetPath. Lookups will be restricted to ScopeToDirectory. e.g. Resources.Initialize( "/Game/Widgets/SFortChest", "/Game/Widgets" ) Resources.GetBrush( "SFortChest/SomeBrush" ); // Will look up "/Game/Widgets" + "/" + "SFortChest/SomeBrush" = "/Game/Widgets/SFortChest/SomeBrush" Resources.GetBrush( "SSomeOtherWidget/SomeBrush" ); // Will fail because "/Game/Widgets/SSomeOtherWidget/SomeBrush" is outside directory to which we scoped.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss