Search Unity

Modular 3D Text - Complete ingame ui sytem

Discussion in 'Assets and Asset Store' started by Ferdowsur, Feb 4, 2020.

  1. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Hi,
    Looks like there are some issues with the fonts. They need to be fixed in some kind of font editor before getting used.
    I suggest Font forge, it's free.

    Here are some things I suggest:
    1. The letters aren't centered properly.

    Open the font in font forge, Right click the affected characters and click Center in Width


    2. Flipped characters. Example: d in the mono font. The spacing of the fonts are fine but the pivot of the character is way off, so it looks like the spacing is off.
    In font forge double click the letter to open the editor, press Ctrl + Shift + D or go to Elements > Correct direction.
    You might want to unlink it too. Not always necessary but suggested.

    3. Also, select all the characters,
    Elements > Simplify > Simplify.
    Overlap > Remove Overlap.

    4. Font forge should suggest some options itself when you generate the font, apply them as well.



    There could be other issues but that's all I found with a quick lookup.
    I think the easiest option would be to use a different similar font. But if you decide to fix this one and need any help, don't hesitate to contact, always happy to help.

    Hopefully I explained it properly. I am super sick. My grammar is a bit more off than usual:(
     
    Last edited: Apr 20, 2021
    ratking likes this.
  2. NoteMEdown

    NoteMEdown

    Joined:
    Sep 6, 2018
    Posts:
    2
    Hey, I am using v2.0.0 and I am getting some scenes that have this same problem. I believe it happened when I made the text a prefab. That is what seemed to really mess things up.

    That script did help fix the issue though.
     
    Last edited: Apr 30, 2021
  3. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Hi,
    There is a newer version on the asset store. Please update to that version and that should stop the issue from reappearing
     
  4. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    266
    Hey, the online documentation seems to be deleted?

    Also all my text seems to be arranged vertically on default settings but I can't find anything related to bounding boxes
     
    Last edited: May 2, 2021
  5. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    266
    Here a screenshot
     

    Attached Files:

    • Text.png
      Text.png
      File size:
      308.3 KB
      Views:
      31
  6. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Hi
    This is the link of the documentation : https://app.gitbook.com/@ferdowsur/s/tinygiantstudios/
    Seems to be working. Maybe it was down for some reason.

    upload_2021-5-2_21-45-30.png
    The bounding box is the length and height. In the scene view, turn on Gizmos. You will be able to see it as well. They will appear vertically if they don't fit in length.

    From looking at the screen shot, if I didn't miss anything, it seems like they should fit Horizontally. Is it happening with all fonts or that particular one. If it's only that font, can you select that font and check the character spacing value in that font. The spacing should be 1 in most cases. Maybe it was changed accidentally.
     
  7. alxdncn

    alxdncn

    Joined:
    Jun 17, 2016
    Posts:
    3
    Hi - I tried setting up some Katakana fonts and was unable to get it to work in the Blender extension. I get the following error. I was running this on Blender 2.92 and Windows.

    Code (CSharp):
    1. Python: Traceback (most recent call last):
    2.   File "C:\Users\Alex\Documents\GitHub\JapaneseText\Assets\Tiny Giant Studio\Modular 3D Text\Blender Font Extractor\Font Extractor - Unzip to use\Open with blender - Text extractor.blend\Text Extractor", line 45, in execute
    3.   File "C:\Program Files\Blender Foundation\Blender 2.92\2.92\scripts\modules\bpy\ops.py", line 132, in __call__
    4.     ret = _op_call(self.idname_py(), None, kw)
    5. RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect
    6.  
    7. location: <unknown location>:-1
    8.  
    9.  
    I even get an error with the default character range that the Blender scene opens with. This is the error in that case:

    Code (CSharp):
    1. Python: Traceback (most recent call last):
    2.   File "C:\Users\Alex\Documents\GitHub\JapaneseText\Assets\Tiny Giant Studio\Modular 3D Text\Blender Font Extractor\Font Extractor - Unzip to use\Open with blender - Text extractor.blend\Text Extractor", line 130, in execute
    3.   File "C:\Users\Alex\Documents\GitHub\JapaneseText\Assets\Tiny Giant Studio\Modular 3D Text\Blender Font Extractor\Font Extractor - Unzip to use\Open with blender - Text extractor.blend\Text Extractor", line 57, in processLetter
    4. RuntimeError: Error: Cannot read 'C:\Users\Alex\Documents\GitHub\JapaneseText\Assets\Tiny Giant Studio\Modular 3D Text\Blender Font Extractor\Font Extractor - Unzip to use\Open with blender - Text extractor.blend': unsupported font format
    5.  
    6.  
    7. location: <unknown location>:-1
    8.  
    9.  
    Am I doing something wrong?
     
  8. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Hi,
    Sorry to hear you are having issues.

    The first error appears if you try to extract the font in Edit mode. Please swap to object mode first to do it.
    (I will change it to work in both mode next update)

    The second error says unsupported font format. Will it be possible to share the font file? I got the Katakana font from here to test: https://www.dafont.com/katakana.font
    If it's the same font, can you check the font file downloaded from here?
     
  9. alxdncn

    alxdncn

    Joined:
    Jun 17, 2016
    Posts:
    3
    Thanks for getting back to me - it seems I missed a step. So I need to download a font first (ttf, for example) and then, when I click extract, I select that font. Is that right? I'm a bit confused about how to set the range, however. When I left it as a default (! to ~) it worked fine. When I actually tried to select the Katakana range, they all came out as squares.
     
  10. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Hi,
    Yes, you are on the correct process.
    Blender writes squares when a font doesn't have the appropriate character. Sounds like Blender can't find the characters in the Katakana range.

    Can you check if the font has the characters? There several ways to check it.

    Example
    :
    1. Install the font on your computer,
    2. Open up a Doc,
    3. Type the missing characters with the font.
    4. Check if they are written and in the correct font you are checking. Some software like MS Word automatically changes the font for characters that don't exist in the original font. So, they dont appear as block but that specific character is in a different font.

    Or,

    Open the font in something like Font Forge and you can check all info/characters of the font.
     
  11. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Version 2.0.2
    • Editor performance improvement
    • Fixed a bug that was causing issue creating new lines in text in Editor
     
    Last edited: May 18, 2021
  12. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Version 2.1.0
    • Updated asset to 2019 Unity version to comply with up-coming Asset store requirement.
    • Bugfix: List/Button visual updates now sets text dirty to mark/save changes.
    • Bugfix: In-editor, List/Button no longer updates text unnecessarily.
    • Bugfix: Fixed a bug where controlling list with keyboard when list had 0 elements caused a error.
    • In editor darkmode, modules have better coloring.
    • Updated almost all inspectors.
     
  13. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Version 2.1.3
    • Bugfix: Parent scale not properly being applied to text
     
  14. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Version 2.2.0
    • Bugfix: Fixed text updater empty mesh check.
    • Bugfix: Scripting define fix that was causing build error.
    Version 2.1.3
    • Bugfix: Parent scale not being applied to combined mesh properly
     
  15. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    46
    Had a question about the MText_Settings object. I checked the documentation but didn't see anything referencing it. Once i create one of those settings objects, how do I get it to apply to new text?
     
  16. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    The settings file is just for the editor stuff by the asset.
    There is no need to create new ones.

    It just holds some default values for the asset and makes it easier to modify them if needed. And some custom editor values shared by multiple scripts.
     
  17. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    46
    What i'm trying to do is set the default material and size setting for text in my project. That way, when i create a new one, it uses my defaults. Is that not where I should be doing that? After I created a settings asset, none of the values I set in it were applied to new text that was created.
     
  18. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Couple of options:

    1. I would recommend this. For simplicity, you can use a prefab. I think that would make it much easier to handle this scenario.

    2. Select the Modular3DText.cs file in scripts folder and you can change the default text and material. Easy but that's it, those two variables only.

    3. There is no way to handle multiple setting files as I don't see any use cases to do that. There is already a settings file in resources folder. You can change your default text values there. Having multiple might cause issues.

    Open the MText_MenuItem.cs folder, modify the LoadDefaultTextSettings method to this. (Around line 311)

    Code (CSharp):
    1.         static void LoadDefaultTextSettings(Modular3DText text)
    2.         {
    3.             MText_Settings settings = EditorHelper.MText_FindResource.VerifySettings(null);
    4.  
    5.             if (settings)
    6.             {
    7.                 text.Font = settings.defaultFont;
    8.                 text.FontSize = settings.defaultTextSize;
    9.                 text.Material = settings.defaultTextMaterial;
    10.                 //text.autoCreateInEditor = settings.autoCreateInEditorMode;
    11.                 //text.autoCreateInPlayMode = settings.autoCreateInPlayMode;
    12.             }
    13.         }

    Note that not all the values from the settings file are applied in the asset. That's why the file and the documentation for the file isn't out in the open. Slowly adding support for it one, two scripts at a time, since it can potentially break the asset by mistake.
    The plan for this is to have a Tab in the tools window for setting like making mass changes in scene. Most of the codes that are there but commented out are to support upcoming changes.

    I am currently working on a big update for the text that would make using the text much easier and will improve the process of extending the asset both by me(asset creator) and the user.
     
  19. rmuk

    rmuk

    Joined:
    Feb 18, 2015
    Posts:
    46
    Ah thanks for that information! I guess the main thing I wanted was to be able to use the settings object (I don't need to create my own, I didn't realize one was auto created in resources) to globally define what font/material is used. My intent was never to have multiple, I just didn't know that there was a main one. So i'll use the one in the resources folder. Sorry for the confusion. The update sounds great though, looking forward to it!

    Speaking of materials though, I'm migrating to your asset from vtext since it doesn't work well with the new prefab system (your ability to save the meshes to asset files is extremely useful, and the performance of just having it generate the text at runtime is fast enough that pre-generating the meshes isn't completely necessary). One feature that I do miss is the ability to set a different material for the sides and/or back of the text. I'm sort of faking that functionality using a shader at the moment, but is that something that you could look into adding?
     
  20. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Sorry, currently there are no immediate plans to add support for that kind of material setup atm. I will look into it in future.
     
  21. rozochkin13

    rozochkin13

    Joined:
    Nov 27, 2019
    Posts:
    4
    Hello,
    I'm having one issue with 2 Cyrillic letters, can you help please?
    I use this font https://fonts.google.com/specimen/Yanone+Kaffeesatz?subset=cyrillic
    and these settings:
    Unicode Sequence
    0021-007E,00C0,0410-042F
    Everything works well except 2 letters:
    0420 and 042B
    I see "space" GameObject instead of these letters.
    Thanks.
     
  22. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Hi,
    The space/empty gameobject appears if a letter is missing in the exported font.
     
  23. rozochkin13

    rozochkin13

    Joined:
    Nov 27, 2019
    Posts:
    4
    Hi,
    Thank you for the information!
    But when I use this font in UI text boxes the letters above works well. It's strange.
     
  24. Monte1312

    Monte1312

    Joined:
    Sep 9, 2015
    Posts:
    5
    Hello, I just bought this asset on friday. I'm wondering how do you get the letters to have two diferent colors, for example white in the front/back and red in the borders? I'm trying to create something like your previews, but I'm not good with shaders. Do you have a shader that already does this by any chance?
    (I added an image as reference, it's 2D text, and what I want to do is replicate that with your tool)



    Thanks for your tool, it might be of great help in my project and also thanks in advance for your response.
     

    Attached Files:

  25. Ferdowsur

    Ferdowsur

    Joined:
    Feb 7, 2017
    Posts:
    132
    Sorry for the late reply, I am having some issues with my personal life.

    Example scene 16 is the one you are looking for. It isn't the best approach to get something like this but pretty easy one I think.
     
unityunity