Debug.Log Extensions
Documentation (1.1.9)

◆ LogAssertionFormat()

static void Debug.LogAssertionFormat ( string  format,
params object[]  args 
)
static

Logs an assertion message to the Console formed by inserting the values of args zero or more objects into a format text string.

public IEnumerator PlaySound(float delay, AudioId audioId) { if(delay < 0f) { Debug.LogErrorFormat("PlaySound({0}) called with an invalid delay: {1}.", audioId, delay); delay = 0f; }

yield return new WaitForSeconds(delay);

audioController.Play(audioId); }

Parameters
formatA composite format string based on which the message is generated.

Each format item inside the string is replaced by the value of the argument at the same index.

A format item consists of braces ("{" and "}") containing the index of the argument whose value should be inserted into the format string at that location.

Parameters
argsZero or more objects to be converted to string and inserted into the format composite format string.