unity 字符串转16进制
/// <summary>
/// 字符串转16进制
/// </summary>
/// <param name="input">要转格式的字符串</param>
private byte[] Convert16(string strText)
{
strText = strText.Replace(" ", "");
strText = strText.Replace(" ", "");
Debug.Log(strText);
byte[] bText = new byte[strText.Length / 2];
for (int i = 0; i < strText.Length / 2; i++)
{
bText[i] = Convert.ToByte(Convert.ToInt32(strText.Substring(i * 2, 2), 16));
}
return bText;
}