Fix \0 chars in TextAssets cutting off preview

This commit is contained in:
sk-zk 2020-10-30 23:08:06 +01:00
parent 3e77c34bd5
commit f644396a15

View File

@ -926,7 +926,8 @@ namespace AssetStudioGUI
private void PreviewTextAsset(TextAsset m_TextAsset)
{
var text = Encoding.UTF8.GetString(m_TextAsset.m_Script);
PreviewText(text.Replace("\n", "\r\n"));
text = text.Replace("\n", "\r\n").Replace("\0", "");
PreviewText(text);
}
private void PreviewMonoBehaviour(MonoBehaviour m_MonoBehaviour)