void CachePreview() { string text = string.Empty; if (m_TextAsset != null) { if (targets.Length > 1) { text = targetTitle; } else if (Path.GetExtension(AssetDatabase.GetAssetPath(m_TextAsset)) != ".bytes") { text = m_TextAsset.GetPreview(kMaxChars); if (text.Length >= kMaxChars) { text = text.Substring(0, kMaxChars) + "...\n\n<...etc...>"; } } else { text = $"{EditorUtility.FormatBytes(m_TextAsset.dataSize)} size .bytes file"; } } m_CachedPreview = new GUIContent(text); }