RealDocs

UKismetSystemLibrary::ControlScreensaver

function Engine Blueprint Since 4.0
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticBlueprintCallable

Description

Allows or inhibits the OS screensaver, useful for keeping the screen active during idle gameplay or cutscenes.

Caveats & Gotchas

  • Support is platform-dependent — not every OS exposes an API to suppress the screensaver, so calling this with bAllowScreenSaver=false is not guaranteed to have an effect everywhere.
  • The inhibited state typically doesn't persist after the game exits or crashes on some platforms; consider re-asserting it on resume rather than assuming it stays set forever.
  • Leaving the screensaver permanently disabled works against OS power-saving and burn-in protection — re-enable it once your idle sequence ends.

Signature

static ENGINE_API void ControlScreensaver(bool bAllowScreenSaver)

Parameters

Name Type Description Default
bAllowScreenSaver bool If false, inhibit the screensaver where the platform allows it; if true, restore default OS behaviour.

Return Type

void

Example

Suppress screensaver during a cutscene C++
UKismetSystemLibrary::ControlScreensaver(false);
// ... play cutscene ...
UKismetSystemLibrary::ControlScreensaver(true);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.