Play Sound

 Unreal

void AGameActor::PlaySoundEffect() {

                USoundBase* theSoundFX;

class UGameplayStatics::PlaySoundAtLocation(this, theSoundFX, GetActorLocation());//#include "Sound/SoundBase.h"

}

Unity

void AGameActor::PlaySoundEffect() {

       AudioSource* theSoundFX = GetComponent<AudioSource>();//audioSource.PlayOneShot(audioClip, 0.7f);

       theSoundFX.Play();

}

Comments

Popular posts from this blog

Open Level

Animation