[HOWTO] How To: Integrate Arabic Support for Unity

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 20704
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Integrate Arabic Support for Unity

Post by Tony Li »

A user contributed the script below to integrate the free Arabic Support for Unity asset. Add it to the Dialogue Manager GameObject.

FixToArabic.cs

Code: Select all

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using ArabicSupport;
using PixelCrushers.DialogueSystem;
 
public class FixToArabic : MonoBehaviour
{
   
   void OnConversationLine(Subtitle subtitle)
    {
        subtitle.formattedText.text = ArabicFixer.Fix(subtitle.formattedText.text, false, false);
    }
 
    void OnConversationResponseMenu(Response[] responses)
    {
        for (int i = 0; i < responses.Length; i++)
        {
            responses[i].formattedText.text = ArabicFixer.Fix(responses[i].formattedText.text, false, false);
        }
        
    }
}
Post Reply