Forum rules - please read before posting.

a Farsi (Persian) game from scrach

hi dear!
i want to build a game in default language Farsi (Persian) . it is a complex right to left language (like Arabic). when i type Farsi in dialogues or any other places , it ruins the text because it tries to put the chars from left to right with a space between them. is there any chance i could create a gave with AC in default Persian language ?

Comments

  • Welcome to the community, @hajbahman.

    As you'll be aware, displaying text right-to-left is more complex than it first sounds, as it also affects things like line endings, paragraph alignment, etc.  Trying to account for all of this within AC itself would inevitably lead to problems, and there are some good assets on Unity's Asset Store that handle this better than AC ever could.

    The best way to do this, in my opinion, would be to rely on Unity UI for your Menus (an option available in the New Game Wizard, and covered in Section 11.3 of the Manual), and then transfer the text in the AC-controlled Text boxes into your own ones that convert the text correctly.

    Essentially, you'd hide the AC Text components from view, and then have a custom script that copies their words, converts them correctly, and then pastes them into a new Text component every frame.
  • edited September 2016
    Thanks for instruction. I used special persian fonts designed to solved these kind of issues. the font is a left to right one wich simulats the right to left Farsi language. When i use this trick inside the menu design part, It works perfect and shows the text correctly. But when i run the game, it ruins the text too.
    If i'm right you suggest that i should use the Unity default component instead of using AC component? But how should i use the dialoge system when player talks to Npc?
  • Ummm... you are misunderstanding a bit. Basically, AC has the option to connect Unity GUI menus to the AC menu system. You create an uGUI menu and then add it to AC and it will use it as if it was one of its own menus. The difference is Unity GUI menus are more customizable, but it's also a bit harder to learn to use them well. Still, if you use Unity I highly recommend you to learn uGUI, anyways.

    I recommend you to check the unity tutorials regarding UI here. Then take a look at AC's tutorial on how to connect uGUI menus to AC here.
  • thanks again. I've got your point, but what i'm seeking is how can i use build in dialogue and speech system. for example assume that  i built a hot spot, i set it to talk to player, i create a one line dialogue that player should say, how can i use Farsi language in this case?
  • edited September 2016
    Hi Hajbahman

    I'm Iranian too .Welcome to forum :)
    This problem is not relative to AC . It's about Unity . Did you test 'Parsi Negrar'  persian software ? I worked with it and haven't any problem after compile too.
    Another alternatives is 'I2 Localization v2.6.5 f5' package .
    Also see here:
    http://promakers.ir/forum/showthread.php?tid=5236

    Good luck
    Mehrdad


  • The first thing will be to get the standard Unity UI up and running correctly, so you can then modify it to suit.

    Do you have a Subtitles Menu listed in your Menu Manager?  If you change it's Source field to Unity Ui Prefab, it'll then rely on Unity UI for its display.

    The default Subtitles UI prefab you can use can be found in /Assets/AdventureCreator/Demo/UI/SubtitlesUI - drag that into the Menu's Canvas field if it is not already assigned.

    Subtitles should then display using that UI when characters speak.  You can then duplicated and modify this SubtitlesUI prefab to work the way you wish.
  • thanks @chrisIceBox ; @alverik @mehrdad, my problem solved in a difficult way, i hope it would solve in a easy way which is the support of Farsi language by AC by default. the package is so great, i enjoy working with it. 
  • Glad to hear it.  If you would like to consider sharing your solution on the AC wiki, I'm sure others would be glad to know of it.
  • Let me write some comment in Farsi:
    دوستان عزیزی که میخان از این پلاگین استفاده کنند اینه که فونت دیفالت رو با یکی از فونت های نرم افزار مریم عوض کنن و متون رو با استفاده از فارسی نویس مریم وارد سیستم کنن. ضمنا نوع فونت از ttf باید به otf تغییر پیدا کنه که ابزار آنلاین و رایگان اون موجوده. موفق باشید.
  • ممنون . ببخشید من اون قسمت وارد کردن ابزار آنلاین از مریم رو متوجه نشدم.میشه یه کم بیشتر توضیح بدید
  • متنتون رو تو نرم افزار مریم تایپ میکنید و کپی پیست می کنید تو نرم افزار یونیتی
  • نوع فونتتون رو باید از تی تی اف به او تی اف تغییر بدید و بعد به جای فونت پیش فرض ادونجر کیریتور قرار بدید.
  • edited September 2016
    Could we switch back to English, please? It will make it easier for other developers with the same type of problem to find this, even if you're trying to solve a specific problem with rendering Farsi.

    I ran into a problem with MS Visual Studio a couple of years ago which was quickly solved because it was very soon obvious that all of us having problems and reporting it (in English) had non-ascii characters in our user names - the official reply from their developer support was something like: "Temporarily change your name to 'Bob' or 'Joe' - we'll be back with a fix soon!  :-)"

    (Yes, the smiley was part of their official reply ...)

  • edited September 2016
    @hajbahman
    That was clear . Thanks so much .

    @Snebjorn
    Sorry for Farsi conversation as here is English forum . There is a software as Maryam name and made for Farsi type. After type we have to copy- paste in Unity and change TTF to OTF and and replace it with default AC font.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.