Hello Ara,
How does your script look? How are you trying to post the event?
For comparison with your script, here's an example of how you could post your Event in BeginPlay().
void ACustomActor::BeginPlay() {
Super::BeginPlay();
UAkComponent* AkComp = NewObject<UAkComponent>(this);
RootComponent = AkComp;
UAkGameplayStatics::PostEventByName("Play_MyEvent", this, true);
}
To get here, I created a new C++ class Actor and dragged it into the scene.
Alternatively, you could post an Event like this...
void ACustomActor::BeginPlay() {
Super::BeginPlay();
UAkComponent* AkComp = NewObject<UAkComponent>(this);
RootComponent = AkComp;
FOnAkPostEventCallback nullCallback;
UAkGameplayStatics::PostEvent(Event, this, int32(0), nullCallback);
}
... and then in your header file add this ...
public:
// Sets default values for this actor's properties
ACustomActor();
UPROPERTY(EditAnywhere, Category = "Wwise")
class UAkAudioEvent* Event;
... which would create a nice Event property under Details, like this:
https://drive.google.com/file/d/1U2hfz9LBEkBbJ1O0vQnHskc4T2_0Dq_h/view?usp=sharing
Let us know if this is helpful.