Skip to content

Instantly share code, notes, and snippets.

@beakr
Created April 2, 2014 18:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beakr/9940587 to your computer and use it in GitHub Desktop.
Save beakr/9940587 to your computer and use it in GitHub Desktop.
Simple debug logging macros for Unreal Engine 4.
/**
* Log a green debug message in the corner of the game screen. Generally
* used for situations in which an operation has completed successfully.
*/
#define BL_LOG_GREEN(str) (GEngine->AddOnScreenDebugMessage(-1, 5.f, \
FColor::Green, \
TEXT(str)))
/**
* Log a yellow debug message in the corner of the game screen. Generally
* used for warnings that aren't necessarily crucial.
*/
#define BL_LOG_YELLOW(str) (GEngine->AddOnScreenDebugMessage(-1, 5.f, \
FColor::Yellow, \
TEXT(str)))
/**
* Log a blue debug message in the corner of the game screen. Generally
* used for basic information that isn't necessarily important.
*/
#define BL_LOG_BLUE(str) (GEngine->AddOnScreenDebugMessage(-1, 5.f, \
FColor::Blue, \
TEXT(str)))
/**
* Log a red debug message in the corner of the game screen. Generally
* used for situations when an operation fails badly (e.g. an error that
* shouldn't be showing up).
*/
#define BL_LOG_RED(str) (GEngine->AddOnScreenDebugMessage(-1, 5.f, \
FColor::Red, \
TEXT(str)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment