Sixze / ALS-Refactored

Completely reworked and improved C++ version of Advanced Locomotion System V4.
MIT License
943 stars 261 forks source link

Error when load Animation Blueprint in CPP #555

Closed wantg closed 1 day ago

wantg commented 3 days ago
class SOMEGMAE_API ACharacter_Base : public AAlsCharacterExample {
    ACharacter_Base();
};

ACharacter_Base::ACharacter_Base(){
    GetMesh()->SetAnimClass(LoadClass<UAnimInstance>(nullptr, TEXT("/Als/ALS/Character/AB_Als.AB_Als_C")));
}

Error: Plugins\ALS-Refactored\Content\ALS\Editor\B_Als_AnimationModifier_FootSyncMarkers.uasset: CreateExport: Failed to load Class /Script/AnimationModifierLibrary.FootstepAnimEventsModifier as Parent for BlueprintGeneratedClass /ALS/ALS/Editor/B_Als_AnimationModifier_FootSyncMarkers.B_Als_AnimationModifier_FootSyncMarkers_C - both will fail to load

UE 5.4

ameaninglessname commented 2 days ago

Please avoid hard coding asset path in code though.

wantg commented 1 day ago

I've always thought that filling in the necessary properties in the code so they're not blank would be more friendly to other people, especially people who don't know programming.

thank you for your suggestion

ameaninglessname commented 1 day ago

IMO, that's better be done with a blueprint base class instead of in code which is error-prone.