Class GridForgeUnityLogger
Optional Unity adapter that forwards GridForgeLogger messages into Unity logging.
[AddComponentMenu("GridForge/Debugging/GridForge Unity Logger")]
[DisallowMultipleComponent]
[ExecuteAlways]
public sealed class GridForgeUnityLogger : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourGridForgeUnityLogger
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.GetComponentIndex()Component.CompareTag(TagHandle)Component.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Properties
ActiveLogger
Gets the component currently forwarding GridForge messages.
public static GridForgeUnityLogger ActiveLogger { get; }
Property Value
EnableOnComponentEnable
Gets or sets whether logging starts when the component is enabled.
public bool EnableOnComponentEnable { get; set; }
Property Value
HasActiveLogger
Gets whether a Unity logger is currently active.
public static bool HasActiveLogger { get; }
Property Value
IsLoggingEnabled
Gets whether this component currently owns GridForge logging.
public bool IsLoggingEnabled { get; }
Property Value
MinimumLevel
Gets or sets the minimum diagnostic level forwarded to Unity.
public DiagnosticLevel MinimumLevel { get; set; }
Property Value
Methods
DisableLogging()
Restores the GridForge logger settings captured when EnableLogging() succeeded.
public void DisableLogging()
EnableLogging()
Installs this component as the active Unity sink for GridForge messages.
public bool EnableLogging()
Returns
FormatUnityLogMessage(DiagnosticLevel, string, string)
Formats a GridForge diagnostic message for Unity logging.
public static string FormatUnityLogMessage(DiagnosticLevel level, string message, string source)
Parameters
levelDiagnosticLevelThe diagnostic level.
messagestringThe message text.
sourcestringThe optional diagnostic source.
Returns
- string
The formatted Unity log message.
GetUnityLogType(DiagnosticLevel)
Maps a GridForge diagnostic level to a Unity log type.
public static LogType GetUnityLogType(DiagnosticLevel level)
Parameters
levelDiagnosticLevelThe GridForge diagnostic level.
Returns
- LogType
The corresponding Unity log type.