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?
What I used to make the bp note:
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:
https://docs.unrealengine.com/4.26/en-US/API/Plugins/TimeSynth/
I would be very grateful if someone could help me with this, I’m not much of a coder or any…