Legacy Documentation: Version 5.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Debug.AssertFormat

public static void AssertFormat(bool condition, string format, params object[] args);
public static void AssertFormat(bool condition, Object context, string format, params object[] args);

Parameters

condition Condition you expect to be true.
format A composite format string.
args Format arguments.
context Object to which the message applies.

Description

Assert a condition and logs a formatted error message to the Unity console on failure.