public void Init(Console.LogData logData, Console.LogIcons logIcons) { _logString = logData.LogString; _stackTrace = logData.StackTrace; _type = logData.Type; SetIcon(logData.Type, logIcons); textField.text = logData.LogString; }
private void SetIcon(LogType type, Console.LogIcons logIcons) { switch (type) { case LogType.Assert: case LogType.Log: errorIcon.sprite = logIcons.LogIcon; break; case LogType.Warning: errorIcon.sprite = logIcons.WarningIcon; break; case LogType.Exception: case LogType.Error: errorIcon.sprite = logIcons.ErrorIcon; break; default: errorIcon.sprite = logIcons.ErrorIcon; break; } }