// Called when the game starts
void UIntelSoundComponent::BeginPlay()
{
Super::BeginPlay();
//UE4 way of managing files
IFileManager &fileManager = IFileManager::Get();
//UE_LOG(LogTemp, Warning, TEXT("%s"), &fileManager);
if (exists == true){
//Extensions to sound files. Was using .wav, but .uasset seems to work when there is and isn't an editor.
FString ext = "/*.wav";
FString ext2 = "/*.uasset";
//path = FPaths::ProjectDir() + Content/Sounds + /*.uasset
FString path = soundDir + ext2;
//This finds file in the given array, with the given path
//the true bool is saying to look for files while false bool is saying to not look for directories
fileManager.FindFiles(soundFiles, *path, true, false);