Created
April 20, 2025 12:01
-
-
Save aquanox/b263532bcd074a394773cf1ee9e64e02 to your computer and use it in GitHub Desktop.
UE Reload Sound Effect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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