ドキュメント

Unity Engine

Unity Engine

LogAssertionFormat

Logs a formatted assertion message to the Unity console.
読み終わるまでの所要時間 1 分最終更新 20日前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

LogAssertionFormat(string, Object[])

Logs a formatted assertion message to the Unity console.
[Conditional("UNITY_ASSERTIONS")]public static void LogAssertionFormat(string format, params object[] args)

Parameters

format

A composite format string.

Format arguments.

Remarks

Note that these methods work only if UNITY_ASSERTIONS symbol is defined. This means that if you are building assemblies externally, you need to define this symbol otherwise the call becomes a no-op. (For more details see System.Diagnostics.ConditionalAttribute on the MSDN website.

LogAssertionFormat(Object, string, Object[])

Logs a formatted assertion message to the Unity console.
[Conditional("UNITY_ASSERTIONS")]public static void LogAssertionFormat(Object context, string format, params object[] args)

Parameters

context

Object to which the message applies.

format

A composite format string.

Format arguments.

Remarks

Note that these methods work only if UNITY_ASSERTIONS symbol is defined. This means that if you are building assemblies externally, you need to define this symbol otherwise the call becomes a no-op. (For more details see System.Diagnostics.ConditionalAttribute on the MSDN website.