My ball actor has an UAudioComponent, which should play when the ball gets spawned. It also hasa particle system that should start playing at the same time.
void ABall::OnConstruction(const FTransform& Transform)
{
Super::OnConstruction(Transform);
this->ParticleSystem["P_BallIn"]->ActivateSystem();
this->Audio["BallIn"]->Play();
}
The particle system starts playing just fine, however, the audio is not playing at all. This is peculiar, because the audio does play in other non-spawning methods just fine. That means that there’s nothing wrong with the audio file, and it does get loaded correctly in PostInitializeComponents
. I tried Activate()
instead of Play()
as well, but that did not solve the problem.