I am trying to write a function that starts a Sequence Record. I have (borrowed from SequenceRecorderBlueprintLibrary.cpp)
#include "IMovieSceneModule.h"
#include "IMovieSceneSectionRecorder.h"
#include "IMovieSceneSectionRecorderFactory.h"
#include "Runtime/Engine/Classes/Animation/AnimationRecordingSettings.h"
#include "ISequenceRecorder.h"
#include "SequenceRecorder.h"
#include "SequenceRecorderBlueprintLibrary.h"
#include "ActorRecording.h"
#include "SequenceRecorderUtils.h"
#include "SequenceRecorderSettings.h"
void UrecordTools::StartRecordz(AActor* recordtarget)
{
TArray<AActor*> ActorsToRecord;
ActorsToRecord.Add(recordtarget);
FSequenceRecorder::Get().ClearQueuedRecordings();
for (AActor* Actor : ActorsToRecord)
{
FSequenceRecorder::Get().AddNewQueuedRecording(Actor);
}
FSequenceRecorder::Get().StartRecording();
}
I have included the Modules that I think I need.
PublicDependencyModuleNames.AddRange(new string[] { "SequenceRecorder","Core", "CoreUObject",
"Engine",
"UnrealEd",
"MovieScene",
"MovieSceneTracks",
});
But the code will not compile, giving me unresolved external symbol errors.
unresolved external symbol "public: static struct FSequenceRecorder & __cdecl FSequenceRecorder::Get(void)" (?Get@FSequenceRecorder@@SAAEAU1@XZ) referenced in function "public: static void __cdecl UrecordTools::StartRecordz(class AActor *)" (?StartRecordz@UrecordTools@@SAXPEAVAActor@@@Z)
unresolved external symbol "public: void __cdecl FSequenceRecorder::ClearQueuedRecordings(void)" (?ClearQueuedRecordings@FSequenceRecorder@@QEAAXXZ) referenced in function "public: static void __cdecl UrecordTools::StartRecordz(class AActor *)" (?StartRecordz@UrecordTools@@SAXPEAVAActor@@@Z)
(there are no Intelsense errors, and ‘go to definition’ works on the functions)
It seems like I am still missing a Module, but as far as I can see in the docs, I should only need ‘SequenceRecorder’. Any help would be great, I am pulling my hair out on this one. Thanks!