Skip to content

Commit

Permalink
Added more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanMurzak committed Jul 26, 2024
1 parent 7aaef85 commit 23b01f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ public bool SetColor(ColorData colorData)
return false;
}
data.colorGuid = colorData.Guid;
SetColor(GetColor(colorData));
var color = GetColor(colorData);

if (Theme.Instance?.debugLevel <= DebugLevel.Log)
Debug.Log($"SetColor: '<b>{data.ColorName}</b>' {color.ToHexRGBA()} at <b>{GameObjectPath()}</b>", gameObject);

SetColor(color);
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/_PackageRoot/Scripts/Binders/BaseColorBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ private void OnValidate()
if (string.IsNullOrEmpty(data.colorGuid) || Theme.Instance?.ColorGuids.Contains(data.colorGuid) == false)
{
data.colorGuid = Theme.Instance?.GetColorFirst().Guid;
if (Theme.Instance?.debugLevel <= DebugLevel.Log)
Debug.Log($"colorGuid is null or doesn't match to any existed colors at: <b>{GameObjectPath()}</b>", gameObject);
if (Theme.Instance?.debugLevel <= DebugLevel.Error)
Debug.LogError($"colorGuid is null or doesn't match to any existed colors at: <b>{GameObjectPath()}</b>", gameObject);
}

TrySetColor(Theme.Instance.CurrentTheme);
Expand Down
2 changes: 1 addition & 1 deletion Assets/_PackageRoot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Ivan Murzak",
"url": "https://github.com/IvanMurzak"
},
"version": "2.1.0",
"version": "2.1.1",
"unity": "2019.2",
"description": "Create palettes of colors and components for change specific color on a specific visual element. Very useful to UI.",
"keywords": [
Expand Down

0 comments on commit 23b01f8

Please sign in to comment.