Skip to content

Instantly share code, notes, and snippets.

@aquanox
Created April 20, 2025 12:01
Show Gist options
  • Save aquanox/b263532bcd074a394773cf1ee9e64e02 to your computer and use it in GitHub Desktop.
Save aquanox/b263532bcd074a394773cf1ee9e64e02 to your computer and use it in GitHub Desktop.
UE Reload Sound Effect
// module startup
FCoreUObjectDelegates::ReloadCompleteDelegate.AddRaw( this, &FMyEditorModule::HandleReloadFinished );
// module shutdown
FCoreUObjectDelegates::ReloadCompleteDelegate.RemoveAll( this );
void FMyEditorModule::HandleReloadFinished( EReloadCompleteReason Reason )
{
FNotificationInfo Info( LOCTEXT("ReloadFinished", "Reload Complete!") );
Info.Image = FAppStyle::GetBrush(TEXT("LevelEditor.RecompileGameCode"));
Info.FadeInDuration = 0.1f;
Info.FadeOutDuration = 0.5f;
Info.ExpireDuration = 1.5f;
Info.bUseThrobber = false;
Info.bUseSuccessFailIcons = true;
Info.bUseLargeFont = true;
Info.bFireAndForget = false;
Info.bAllowThrottleWhenFrameRateIsLow = false;
auto NotificationItem = FSlateNotificationManager::Get().AddNotification( Info );
NotificationItem->SetCompletionState(SNotificationItem::CS_Success);
NotificationItem->ExpireAndFadeout();
GEditor->PlayEditorSound(TEXT("/Engine/EditorSounds/Notifications/CompileSuccess_Cue.CompileSuccess_Cue"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment