Hello i am trying to load an animation from an .fbx file (automated, without using any UI)
I found this function
UEditorEngine::ImportFbxAnimation
which successfully creates the animation but its empty!
Check this code:
//suppose a skeleton attached (which is exactly the same with the fbx loaded.
USkeleton* MySkeleton;
FName AssetName = FName("Created_Anim");
FString PackageName = FString("/Game/Anim");
UPackage* Package = CreatePackage(nullptr, *PackageName);
FString FileName = FString("C:/Users/Mike/Downloads/input.fbx");
UFbxAnimSequenceImportData* Data = NewObject<UFbxAnimSequenceImportData>();
UAnimSequence* NewAnim = UEditorEngine::ImportFbxAnimation(MySkeleton, Package, Data, *FileName, *(AssetName.ToString()), false);
NewAnim->MarkPackageDirty();
ULevel::LevelDirtiedEvent.Broadcast();
NewAnim->PostEditChange();
any thoughts?