Data table row can be a user defined class?

I have a struct for my data table row.

USTRUCT(Blueprintable)
struct FKObjectDefinitionStruct : public FTableRowBase
{
	GENERATED_USTRUCT_BODY()

	/**
	 * @brief The object icon.
	 *
	 */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = ObjectDefinition)
	TAssetPtr<UTexture> Icon;

	/**
	* @brief The object title.
	*
	*/
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = ObjectDefinition)
	FText Title;

	/**
	* @brief The object description.
	*
	*/
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = ObjectDefinition)
	FText Description;

	/**
	* @brief The AKPickupObject.
	*
	*/
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = ObjectDefinition)
	TAssetPtr<AKPickupObject> Object;

	/**
	* @brief Default struct constructor.
	*
	*/
	FKObjectDefinitionStruct()
	{
	}
};

For FText and UTexture data type, no problem it works.
But for the TAssetPtr Object, it doesn’t work.

The AKPickupObject is a class derived from several classes

UObject
– AActor
– AKBasicObject
– AKPickupObject

I have several class implementing the AKPickupObject :

AKPickupObject
– AKEquipObject
– AKWeapon
– AKWeapon_Bullet
– AKWeapon_Projectile

In my csv file I’ve tried to specify the class type for loading automatically the object.
For the Texture2D type it works but not for AKPickupObject type.

Name,Icon,Title,Description,Object
000001,"""Texture2d'/Game/GameObjects/Weapons/Guns/Icons/WeaponGun'""","Weapon Gun","This is a gun","""KPickupObject'/Game/GameObjects/Weapons/Guns/Blueprints/WeaponGun'"""
000002,"""Texture2d'/Game/GameObjects/Weapons/Guns/Icons/WeaponLauncher'""","Weapon Launcher","This is a launcher","""KPickupObject'/Game/GameObjects/Weapons/Guns/Blueprints/WeaponLauncher'"""
000003,"""Texture2d'/Game/GameObjects/Weapons/Guns/Icons/WeaponGun'""","Weapon Gun","This is a gun","""KWeapon_Bullet'/Game/GameObjects/Weapons/Guns/Blueprints/WeaponGun'"""
000004,"""Texture2d'/Game/GameObjects/Weapons/Guns/Icons/WeaponLauncher'""","Weapon Launcher","This is a launcher","""KWeapon_Projectile'/Game/GameObjects/Weapons/Guns/Blueprints/WeaponLauncher'"""

I’ve tried specifying the base class KPickupObject or the final class for the object AKWeapon_Bullet / AKWeapon_Projectile.
It doesn’t load the object.

Therefore, is it possible to load object based on specific class, or only ue4 classes are supported ?

Txs if you have an idea.
D.

It is possible. The way I am doing it is having the blueprint names in the csv as a string and doing a FindObject with that string. I haven’t messed around with asset pointers too much but I believe they would also work, someone else might have more info on this.

Ok.
Then you are doing a loop for each rows and for fields needed to load objects you do a FindObject. Did you store the object pointer loaded within the structure to have a later access and avoiding to call the FindObject each time ?

D.

You can do whatever you want depending on your need. If you want to quickly reference something multiple times during runtime then yeah doing what you stated would be good. If it is just an initialization thing then don’t worry about it :).