Audio Component Play not working

In your constructor:

idleVillage = CreateDefaultSubobject<UAudioComponent>(TEXT("IdleVillage"));
idleVillage->SetupAttachment(**RootComponent**);

Then:

UE_LOG(LogTemp, Log, TEXT("ChangeMusicState call received"));
currentMusicState = newState;

// idleVillage->Activate(); Not sure if you need this
idleVillage->SetSound(Sound);
idleVillage->Play(0.f);	
1 Like