Class Log
Custom logging utility that displays log messages in
Unity's debug log and in the simulator's log panel.
Should be preferred over UnityEngine.Debug
.
Inheritance
Namespace: AS2
Assembly: .dll
Syntax
public static class Log
Fields
| Edit this page View SourcelogHistory
Declaration
private static List<string> logHistory
Field Value
Type | Description |
---|---|
List<string> |
logID
Declaration
private static int logID
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceAddToLogHistory(string)
Adds the given text to the log's history.
Declaration
public static void AddToLogHistory(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text that should be added. |
ClearLogHistory()
Clears the log's internal history.
Declaration
public static void ClearLogHistory()
Debug(string)
Logs a debug message.
Declaration
public static void Debug(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The debug message. |
Debug(string, bool)
Logs a debug message.
Declaration
public static void Debug(string text, bool logOnlyInEditor)
Parameters
Type | Name | Description |
---|---|---|
string | text | The debug message. |
bool | logOnlyInEditor | If |
Entry(string)
Logs a simple message.
Declaration
public static void Entry(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The message. |
Entry(string, bool)
Logs a simple message.
Declaration
public static void Entry(string text, bool logOnlyInEditor)
Parameters
Type | Name | Description |
---|---|---|
string | text | The message. |
bool | logOnlyInEditor | If |
Error(string)
Logs an error message.
Declaration
public static void Error(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The error message. |
Error(string, bool)
Logs an error message.
Declaration
public static void Error(string text, bool logOnlyInEditor)
Parameters
Type | Name | Description |
---|---|---|
string | text | The error message. |
bool | logOnlyInEditor | If |
SaveLogToFile(string)
Writes the log's history to the given file.
Declaration
public static void SaveLogToFile(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to the file to which the log should be written. |
Warning(string)
Logs a warning message.
Declaration
public static void Warning(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The warning message. |
Warning(string, bool)
Logs a warning message.
Declaration
public static void Warning(string text, bool logOnlyInEditor)
Parameters
Type | Name | Description |
---|---|---|
string | text | The warning message. |
bool | logOnlyInEditor | If |