Make icon cache save to disk
This commit is contained in:
@@ -66,38 +66,6 @@ public static class Tools
|
||||
if (root.TryGetComponent<RectTransform>(out var rect)) LayoutRebuilder.ForceRebuildLayoutImmediate(rect);
|
||||
}
|
||||
|
||||
public static (string, string) FixIconData(string i)
|
||||
{
|
||||
try
|
||||
{
|
||||
int t = i.Length;
|
||||
int h = 128;
|
||||
int d = t - h;
|
||||
int a = d / 4;
|
||||
int b = h / 4;
|
||||
|
||||
string D = string.Concat(
|
||||
i.Substring(0, a),
|
||||
i.Substring(a + b, a),
|
||||
i.Substring(a * 2 + b * 2, a),
|
||||
i.Substring(a * 3 + b * 3, d - a * 3)
|
||||
);
|
||||
|
||||
string H = string.Concat(
|
||||
i.Substring(a, b),
|
||||
i.Substring(a * 2 + b, b),
|
||||
i.Substring(a * 3 + b * 2, b),
|
||||
i.Substring(a * 4 + b * 3, b)
|
||||
);
|
||||
|
||||
return (D, H);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return (null, null);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Sha512Sum(byte[] data)
|
||||
{
|
||||
using var sha512 = SHA512.Create();
|
||||
|
||||
Reference in New Issue
Block a user