Class EditorGraphLogger
A context to store and access logs provided to each nodes of a graph during an import at editor time.
Inherited Members
Namespace: UnityEditor .Importer
Assembly: Unity.Importer.Editor.dll
Syntax
public class EditorGraphLogger : GraphLogger
Constructors
EditorGraphLogger(AssetImportContext)
A context to store and access logs provided to each nodes of a graph at editor time.
Declaration
public EditorGraphLogger(AssetImportContext assetImportContext)
Parameters
Type | Name | Description |
---|---|---|
Asset |
assetImportContext | The AssetImportContext of the current import (provided by a Scripted |
Methods
GetAnalyticsData<T>(string)
Get analytics data added with Register
Declaration
public T GetAnalyticsData<T>(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of the analytics data. |
Returns
Type | Description |
---|---|
T | The value corresponding to key. |
Type Parameters
Name | Description |
---|---|
T | The type of the data. |
GetErrorsForAnalytics()
Get internal error ids and their corresponding counts registered with Log
Declaration
public IReadOnlyDictionary<int, int> GetErrorsForAnalytics()
Returns
Type | Description |
---|---|
IRead |
The accumulated errors and their counts during the import. |
GetWarningsForAnalytics()
Get internal warning ids and their corresponding counts registered with Log
Declaration
public IReadOnlyDictionary<int, int> GetWarningsForAnalytics()
Returns
Type | Description |
---|---|
IRead |
The accumulated warnings and their counts during the import. |
LogImportError(string, Object, int)
Logs import error. The error id would be accumulated if the error id is registered for analytics. The accumulated error ids and their counts during an import can be retrieved with GetErrorsForAnalytics.
Declaration
public override void LogImportError(string errorMessage, Object obj = null, int errorId = -1)
Parameters
Type | Name | Description |
---|---|---|
string | errorMessage | The error message. |
Object | obj | Optional Object that is targeted by the error. |
int | errorId | The internal error id used for analytics. |
Overrides
LogImportWarning(string, Object, int)
Logs import warning. The warning id would be accumulated if the warning id is registered for analytics. The accumulated warning ids and their counts during an import can be retrieved with GetWarningsForAnalytics.
Declaration
public override void LogImportWarning(string warningMessage, Object obj = null, int warningId = -1)
Parameters
Type | Name | Description |
---|---|---|
string | warningMessage | The warning message. |
Object | obj | Optional Object that is targeted by the warning. |
int | warningId | The internal warning id used for analytics. |
Overrides
RegisterAnalyticsData(string, object)
Add analytics data during import. Data of the same key can be retrieved with Get
Declaration
public override void RegisterAnalyticsData(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key of the analytics data. |
object | value | The value of the analytics data. |