Hey everyone,
Issue
I can’t seem to use Set Anim Instance Class correctly using an Anim Blueprint Asset ID for an AnimBlueprint read in from a data table. I’m using C++ for the data table so I’ll include the relevant code too.
When I run my game I get this [Call Stack][1]
I’ll go from the DataTable forwards to the Blueprint code.
DataTable CSV File
1,Inara,Dreamcatcher,"""Inara is OP!""",1000,800,55,40,63,200,"""SkeletalMesh'/Game/DreamcatcherAssets/Character/ThirdPersonSkelMesh.ThirdPersonSkelMesh'""","""AnimBlueprint'/Game/DreamcatcherAssets/Character/ThirdPersonAnimBlueprint.ThirdPersonAnimBlueprint'"""
C++ Code
UtilityClass.h
USTRUCT(BlueprintType)
struct FGameCharacterLookupTable : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
public:
// UNRELATED PROPERTIES OMMITTED
UPROPERTY()
TAssetPtr<UAnimBlueprint> Character_Anim;
};
I then transfer the data to a CharacterProfile class
CharacterProfile.h
UCLASS(BlueprintType)
class PROJECT_DREAMCATCHER_API UCharacterProfile : public UObject
{
public:
GENERATED_BODY()
UCharacterProfile();
// IRRELEVANT PROPERTIES OMMITTED
UPROPERTY( BlueprintReadOnly )
TAssetPtr<UAnimBlueprint> characterAnim;
private:
};
UtilityClass.cpp - createDefaultCharacter() function
static FGameCharacterLookupTable* lookupRow = CharacterProfileLookupTable->FindRow<FGameCharacterLookupTable>( FName( TEXT( "1" ) ), *ContextString );
// IRRELEVANT CODE OMMITTED
newCharacter->characterAnim = lookupRow->Character_Anim;
return newCharacter;
Blueprint
Create character and set mesh from a SkeletalMesh read in from the data table
Attempt to set the Anim Instance Class for that mesh from value read in from data table
Any help would be greatly appreciated, thanks!