Debug console basically finished and working (using TMP now)

This commit is contained in:
sinaioutlander
2020-10-24 20:18:42 +11:00
parent 25747503cc
commit 0d4b4dc826
8 changed files with 311 additions and 23 deletions

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Explorer.Unstrip.ColorUtility
{
public static class ColorUtilityUnstrip
{
public static string ToHex(this Color color)
{
var color32 = new Color32(
(byte)Mathf.Clamp(Mathf.RoundToInt(color.r * 255f), 0, 255),
(byte)Mathf.Clamp(Mathf.RoundToInt(color.g * 255f), 0, 255),
(byte)Mathf.Clamp(Mathf.RoundToInt(color.b * 255f), 0, 255),
1
);
return string.Format("{0:X2}{1:X2}{2:X2}", color32.r, color32.g, color32.b);
}
}
}