DRHPS/code-csharp/en_US/TEXTUI_SubmeshChecker.cs
2025-04-08 11:31:35 +08:00

29 lines
742 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using TMPro;
using UnityEngine;
public class TEXTUI_SubmeshChecker : MonoBehaviour
{
[SerializeField]
private TextMeshProUGUI TextUI;
private void Update()
{
if (TextUI.transform.childCount > 0)
{
Debug.LogWarning("Submesh TextMeshPro Detected");
Debug.LogWarning(TextUI.text);
base.enabled = false;
}
if (TextUI.text.Contains('…'))
{
Debug.LogError("Incorrect elipse detected");
Debug.LogWarning(TextUI.text);
}
if (TextUI.text.Contains(''))
{
Debug.LogError("Incorrect apostrophe detected");
Debug.LogWarning(TextUI.text);
}
}
}