Debug.Log Extensions
Documentation (1.1.9)

◆ LogIf() [3/3]

static void Debug.LogIf ( bool  condition,
int  channel,
[NotNull] Expression< Func< object >>  classMember,
Object  context = null 
)
static

If condition is true logs to the Console on the given channel the name and value of classMember a class member.

If condition is false does nothing.

Parameters
conditionCondition that must be true for logging to take place.
channelThe channel to which the message belongs.
classMemberExpression pointing to a class member whose name and value will be logged.
contextObject to which the message applies.