How to call functions in FSequencerSelection?

Hello!
I try to call a GetSelectedKeys() function in FSequencerSelection but I always get an unresolved external symbol error when compiling. Here is example:

TSharedPtr<ISequencer> UAIGameCoreEditorSubsystem::GetSequencer(ULevelSequence* LevelSequence)
{
	UAssetEditorSubsystem* AssetEditorSubsystem = GEditor->GetEditorSubsystem<UAssetEditorSubsystem>();
	IAssetEditorInstance* AssetEditor = AssetEditorSubsystem->FindEditorForAsset(LevelSequence, true);
	FLevelSequenceEditorToolkit* SequenceEditorToolkit = (FLevelSequenceEditorToolkit*)AssetEditor;

	return SequenceEditorToolkit->GetSequencer();
}

auto tmp = GetSequencer(CurrentLevelSequence.Get())->GetSelection()
.GetSelectedKeys(); // notwork

I have added Sequencer to the build UE version is 5.2. Is there any solution?
Thank you.

I am using v5.4.3 so it this might not be relevant but in my codebase there is no ISequencer::GetSelection() method. What return type do you expect from GetSelection()?

virtual FSequencerSelection& GetSelection() = 0;

This function in ISequencer. And it’s implemented in FSequencer.

Yea, sorry. I guess our codebase is different. I won’t be able to help.

It does look like that, but thanks for the help anyway.

My UE version is 4.24. When I call functions in FSequencerSelection, I got link error too,
did you solve this problem?