bm9/IM4U

MMDExtend asset could not load

rockyappdev opened this issue · 1 comments

PmxFactory.cpp
Line: 1410
FString ObjectName = FString::Printf(TEXT("%s_MMDExtendAsset"), *Name.ToString());
This string "%s_MMDExtendAsset" needs to match with actual CLASS name.
Solution: CLASS MMDExtend rename to MMDExtendAsset, or fix the above string.

Thanks for the quick fix.
Now, I can load the asset by below code.
.h
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = IK)
TAssetPtr MMDExtendAssetRef;
.cpp
const FStringAssetReference& AssetRef = MMDExtendAssetRef.ToStringReference();
MMDExtendAssetRef = Cast(StaticLoadObject(UMMDExtendAsset::StaticClass(), NULL, *AssetRef.ToString()));