Debug.Log Extensions
Documentation (1.1.9)

◆ LogIf() [1/3]

static void Debug.LogIf ( bool  condition,
string  message,
Object  context = null 

If condition is true logs a message to the Console.

If condition is false does nothing.

conditionCondition that must be true for logging to take place.
messageMessage to display.
contextObject to which the message applies.