GetConsoleLogCounts(out int, out int, out int)
Retrieve the current counts of messages in the Console Window.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
GetConsoleLogCounts(int, int, int)
public static void GetConsoleLogCounts(out int error, out int warn, out int log)
Parameters
Remarks
Returns the current number of Error, Warning, and Log messages that are currently present in the Console Window.
Examples
using UnityEngine;using UnityEditor;public class Example : MonoBehaviour{ [MenuItem("Example/Print Log Counts")] static void PrintLogCounts() { ConsoleWindowUtility.GetConsoleLogCounts(out int error, out int warning, out int log); Debug.Log($"Errors: {error}, Warnings: {warning}, Info: {log}"); }}