Download

Make an TimeSync Array

I wanna load the music names for TimeSynth into an array so I can reference it later.

I put together a bp note that gets the name of the file into a string array but that is not compatible, how can I put it into a TimeSynth array?

Screenshot 2021-08-16 183502

What I used to make the bp note: List all maps in project or directory - UE4 AnswerHub

The BP Note:

 TArray<FString> UBPFunctionLibary::GetNameForMusic() {
 auto ObjectLibrary = UObjectLibrary::CreateLibrary(UTimeSynthClip::StaticClass(), false, true);
 ObjectLibrary->LoadAssetDataFromPath(TEXT("/Game/LaserShooterGameFiles/Assets/Audio/Music"));
 TArray<FAssetData> AssetDatas;
 ObjectLibrary->GetAssetDataList(AssetDatas);
 UE_LOG(LogTemp, Warning, TEXT("Found Music: %d"), AssetDatas.Num());

 TArray<FString> Names = TArray<FString>();
 for (int32 i = 0; i < AssetDatas.Num(); ++i)
 {
     FAssetData& AssetData = AssetDatas[i];

     auto name = AssetData.AssetName.ToString();
     Names.Add(name);
 }
 return Names;

}

The TimeSynth Documentation: TimeSynth | Unreal Engine Documentation

I would be very grateful if someone could help me with this, I’m not much of a coder or any…