Skip to content

Commit

Permalink
bump version and handle color conversion failure case better
Browse files Browse the repository at this point in the history
  • Loading branch information
PrashantMohta committed Apr 26, 2024
1 parent f012775 commit 2e922c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 10 additions & 3 deletions JsonConverters/ColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
{
try
{
ColorUtility.TryParseHtmlString("#" + reader.Value, out Color loadedColor);
return loadedColor;
if(ColorUtility.TryParseHtmlString("#" + reader.Value, out Color loadedColor))
{
return loadedColor;
}
else
{
Debug.LogError($"Failed to parse color : {reader.Value}");
}
}
catch (Exception ex)
{
Debug.LogError($"Failed to parse color {objectType} : {ex.Message}");
return new Color(1, 1, 1, 1);
}

return new Color(1, 1, 1, 1);
}

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Expand Down
4 changes: 3 additions & 1 deletion Utils/AssemblyUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ public static class AssemblyUtils
/// Name of this Assembly
/// </summary>
public static string name = "Satchel";

/// <summary>
/// Version of this Assembly
/// </summary>
public static string ver = "0.9.0";
public static string ver = "0.9.1";

/// <summary>
/// Gets Version string
/// </summary>
Expand Down

0 comments on commit 2e922c2

Please sign in to comment.