You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PhishingAwarenessSimulation/Assets/ForcedArabic.cs

25 lines
677 B
C#

using UnityEngine;
using TMPro;
using ArabicSupport; // Make sure this script is in your project
[RequireComponent(typeof(TextMeshProUGUI))]
public class ForcedArabic : MonoBehaviour
{
[TextArea(2, 5)]
public string rawArabicInput = "العربية"; // You can paste Arabic here
public bool showTashkeel = true;
public bool useHinduNumbers = true;
private TextMeshProUGUI textMeshPro;
void Start()
{
textMeshPro = GetComponent<TextMeshProUGUI>();
// textMeshPro.isRightToLeftText = true;
string fixedText = ArabicFixer.Fix(rawArabicInput, showTashkeel, useHinduNumbers);
textMeshPro.text = fixedText;
}
}