private void OnDisable() { if (_log != null) { Logger.RemoveLogStream(_log); _log.Dispose(); _log = null; } }
private void OnEnable() { var path = LogFilePath; _log = new FileLogStream(path); if (customChannels != null && customChannels.Length > 0) { _log.Filter = new CustomLogFilter(customChannels); } Logger.AddLogStream(_log); UnityEngine.Debug.Log("Created log file: " + path, this); }