Skip to content

Commit

Permalink
fix(LogSettings): improving warning when log settings has no reference
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Oct 21, 2021
1 parent aec176e commit c2ed26f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Assets/Mirage/Runtime/Logging/LogSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ void Awake()

void OnValidate()
{
// if settings field is changed
RefreshDictionary();
}

void RefreshDictionary()
{
settings.LoadIntoLogFactory();
if (settings != null)
{
settings.LoadIntoLogFactory();
}
else
{
Debug.LogWarning("Log settings component does not have a settings reference", this);
}
}
}
}

0 comments on commit c2ed26f

Please sign in to comment.