Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Thompson Aaron1178

  • Dark Rising Studios
  • Australia
View GitHub Profile
@Aaron1178
Aaron1178 / MyAssetManager.cpp
Last active Aug 12, 2021
Use the Asset Registry to Register WidgetBlueprints as Primary Asset Types of their respective base class.
View MyAssetManager.cpp
void UMyAssetManager::StartInitialLoading()
{
Super::StartInitialLoading();
UE_LOG(LogMyAssetManager, Log, TEXT("Initializing MyAssetManager"))
if ( !bHasScannedForWidgetBlueprints )
{
/** Scan for and Register Widget Blueprints with the Asset Manager*/
Get().RegisterWidgetBlueprintsPrimaryAssets<UMyBaseUUserWidgetClass>();
@Aaron1178
Aaron1178 / AssetManager.cpp
Last active Aug 10, 2021
Unreal Engine Asset Manager and Widget Blueprints in Packaged Builds
View AssetManager.cpp
FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(FName("AssetRegistry"));
IAssetRegistry& AssetRegistry = AssetRegistryModule.Get();
TArray<FString> ContentPaths;
ContentPaths.Add("/Game");
AssetRegistry.ScanPathsSynchronous(ContentPaths, true);
// Use the asset registry to get the set of all class names deriving from Base
TSet< FName > DerivedNames;
{
View SListView.Basics.h
{
SNew(SListView<ItemType>)
.ListItemsSource(ItemSource)
.SelectionMode(ESelectionMode::Single)
.OnGenerateRow(this->OnGenerateRow)
.HeaderRow
(
this->HeaderRow
)
}