Пример #1
0
        /// <summary>
        /// Adds to an <see cref="LogCache"/> <paramref name="_logCache"/> logs for all of the
        /// validators that have been disabled for this run.
        /// </summary>
        /// <param name="_logCache"></param>
        internal void AddDisabledLogs(LogCache _logCache)
        {
            for (var i = 0; i < OverrideItems.Count; i++)
            {
                if (OverrideItems[i].enabled)
                {
                    continue;
                }

                _logCache.OnLogCreated(new ValidationLog
                {
                    source  = LogSource.None,
                    logType = LogType.Warning,
                    message = string.Format(
                        EditorConstants.ConfigValidatorDisabledWarning,
                        OverrideItems[i].type.Name,
                        AssetDatabase.GetAssetPath(this))
                });
            }
        }
Пример #2
0
 /// <summary>
 /// Invoked when a validator has emitted a <see cref="ValidationLog"/> via an event, adds
 /// it to the cache if there is one.
 /// </summary>
 /// <param name="validationLog"></param>
 protected virtual void OnLogCreated(ValidationLog validationLog)
 {
     _logCache.OnLogCreated(validationLog);
 }