TSoftObjectPtr in DataAssets

I have a DataAsset containing SoftObject Pointers to various Groom assets. But UE4 seems to load all assets into memory anyways when I use AssetRegistry to get references to the DataAssets:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"

#include "GroomAsset.h"
#include "GroomBindingAsset.h"
#include "PhysicsEngine/PhysicsAsset.h"
#include "Engine/Texture2D.h"

#include "HGGroom.generated.h"

/**
 * 
 */
UCLASS(BlueprintType)
class HEADGAME_API UHGGroom : public UDataAsset
{
	GENERATED_BODY()
public:
	// General
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "General")
	FName Name;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "General")
	TSoftObjectPtr <UTexture2D> Thumbnail;


	// Hairstyles
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> Cap;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> Short;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> Medium;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> Long;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> PonyTail;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> Bangs;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Hairstyle")
	TSoftObjectPtr<UGroomAsset> Afro;

	// Groom Bindings
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> CapBinding;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> ShortBinding;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> MediumBinding;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> LongBinding;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> PonyTailBinding;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> BangsBinding;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Binding")
	TSoftObjectPtr<UGroomBindingAsset> AfroBinding;

	//Physics Assets
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> CapPhat;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> ShortPhat;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> MediumPhat;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> LongPhat;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> PonyTailPhat;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> BangsPhat;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Physics Assets")
	TSoftObjectPtr<UPhysicsAsset> AfroPhat;
};

I query the asset registry for all my HGGroom DataAssets. Then I add them to a TileView in my character customization widget

As soon as the GetAsset Node is called, UE loads all assets, even though they’re referenced as SoftObjectPtr, into memory which causes the game to freeze for several seconds and causes extreme RAM usage (~6GB). It doesn’t even matter if I add it to the tile view or not at this point.

What am I doing wrong here?

1 Like