Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

FlyingText3D - Real dynamic 3D text from TrueType fonts

Discussion in 'Assets and Asset Store' started by Eric5h5, Jun 11, 2012.

  1. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    Sure, I have a font in there -- it's the same GO with the FlyingText script on it that I've been using for awhile. But I removed the font and added it back...and it works! Duh. Thanks!
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    If you're upgrading from a previous version, it may be worth removing the editor script and re-adding it.

    --Eric
     
  3. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    I was having some other troubles (3D text wasn't UVd so couldn't be lightmapped), so I deleted all the FlyingText files as you suggested. And now when I try to import the latest version from the Asset Store, Unity crashes. It's happened several times, even after I restart the computer. The crash happens after the import loading bar is done. Any suggestions?
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    What version of Unity are you using? I tried importing from the asset store using Unity 3.5 and 4.1 and there weren't any crashes.

    --Eric
     
  5. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    I'm using 4.1.5, but I'm not saying it's a global problem -- I figure there's something in my project that is conflicting with a new import of FT3D. I've deleted every file from FT3D, so the list of files to import has NEW on each and every one, but it still crashes. Any suggestions?

    So it finally occurred to me to try FT3D after the crash and restart....and it works! Weird. But i'm back in business.
     
    Last edited: Jul 7, 2013
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    I don't know why it would crash; I guess that's a Unity bug. Since it seems to be reproducible on your end it might be a good idea to bug report it.

    --Eric
     
  7. MH1

    MH1

    Joined:
    Mar 31, 2013
    Posts:
    7
    I recently bought it, but when I play it even on the demos nothing comes up. Is there something I'm missing?
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Possibly, though I'd need more to go on. Are there errors?

    --Eric
     
  9. MH1

    MH1

    Joined:
    Mar 31, 2013
    Posts:
    7
    I tried it on the latest version of Unity and it worked. On 3.5.2 it does not work even though the FlyingText3D documentation says that it requires Unity 3.5 or later.

    The error is: MissingMethodExeption: Method not found: 'UnityEngine.Mesh.set_colors32".
     
    Last edited: Aug 13, 2013
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Use 3.5.7 (or, technically, 3.5.5, since that's when Mesh.colors32 was introduced, but typically "3.5" refers to 3.5.7, since that's the last version of 3.5 released and what you'd normally be using if you have 3.5, since it contains many bugfixes compared to 3.5.2).

    --Eric
     
  11. MH1

    MH1

    Joined:
    Mar 31, 2013
    Posts:
    7
    I did that and it worked - thanks. If I make the word a game object is there any way to change the word in a c# script?
     
  12. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    I'd recommend the UpdateObject command; see page 20 in the docs.

    --Eric
     
  13. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    290
    Hi.

    I'm getting all spaces changed to "/" o_O
    Running on Windows, tested with standard Arial Black font, Unity 4.2.

    This is what it creates for "HiBllTool Bla".
    $520df77f2cdca4a4867ff4d7.png
     
  14. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Here's what I get with Arial Black:



    What you have doesn't actually look like Arial Black though. Does it happen with other fonts? Are you saving your script using UTF-16?

    --Eric
     
  15. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    290
    Sorry, this is obviously wasn't Arial Black.
    I might have forgotten to switch fonts.

    The font in question was Din Display Pro Black.

    What's interesting is that I also noticed that in numbers like 1999 starting from 1 it leaves big gap after "1" which I would like to reduce. So I changed the font making kerning after "1" a bit less. And this new modified font now works fine with spaces.

    Oiriginal and modified fonts.
    $520e5a212cdca4a486801f16.png

    Tested some other fonts. Most work fine but MyriadWebPro got spaces replaced with "À".
     
  16. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Sounds like the font was a bit corrupted. It may be that some apps that work with TrueType fonts are more tolerant of faults than FlyingText3D.

    --Eric
     
  17. valyard

    valyard

    Unity Technologies

    Joined:
    Jun 4, 2010
    Posts:
    290
    The guy who changed the font reducing measures of some characters used Fontographer and saved it as "OpenType TT / Windows TrueType" with these options:
    $Screen Shot 2013-08-19 at 14.16.29.png
    $Screen Shot 2013-08-19 at 14.16.33.png

    This also fixed the problem with adding "/"'s.
    Just if someone stumbles upon this problem again.
     
  18. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Good to know, thanks!

    --Eric
     
  19. zFerz

    zFerz

    Joined:
    Dec 4, 2012
    Posts:
    11
    Hello!
    I've bought FlyingText3D and at first everything was great, but now I get strange error :
    "FlyingText hasn't been initialized yet...use script execution order to make sure your Awake functions run first, or use Start"
    But I call FlyingText every second in coroutine:

    Code (csharp):
    1. IEnumerator TimerCoroutine()
    2.     {
    3.         while (true)
    4.         {
    5.             try
    6.             {
    7.                 if (timeText != null)
    8.                 {
    9.                     Destroy(timeText);
    10.                 }
    11.                 GameObject newTimeText = FlyingText.GetObjects((Time.realtimeSinceStartup - startTime).ToString("f0"));
    12.                 if (newTimeText != null)
    13.                 {
    14.                     newTimeText.transform.parent = transform;
    15.                     newTimeText.transform.position = transform.position;
    16.                     newTimeText.transform.rotation = transform.rotation;
    17.                     newTimeText.transform.localScale = Vector3.one * 0.7f;
    18.                     timeText = newTimeText;
    19.                 }                
    20.             }
    21.             catch (Exception e)
    22.             {
    23.                 Debug.LogError(e.Message+" trace="+e.StackTrace);
    24.             }
    25.             yield return new WaitForSeconds(1f);
    26.         }
    27.     }
    This code starts to work after spawning prefab that contains FlyingText script and custom script that call for FlyingText.GetObjects() too.
    What am I doing wrong? How much FlyingText script instances shoud exist at the same time?
     
    Last edited: Nov 18, 2013
  20. zFerz

    zFerz

    Joined:
    Dec 4, 2012
    Posts:
    11
    I've imported sources of FlyingText into the project and it looks like only one instance is needed. Whed I removed all extra instances of FlyingText everyting starts to wort again.
     
  21. kunstar

    kunstar

    Joined:
    Jan 20, 2014
    Posts:
    2
    Hi,
    thanks for making this great tool, but I have a little problem with defaultJustification in my code

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using FlyingText3D;
    5.  
    6. public class Text3DTest : MonoBehaviour {
    7.    
    8.    
    9.     // Use this for initialization
    10.     void Start () {
    11.  
    12.         string text = "text";
    13.        
    14.         FlyingText.defaultJustification = Justify.Center;
    15.  
    16.             FlyingText.GetObject(text,FlyingText.defaultMaterial,FlyingText.defaultEdgeMaterial,
    17.                 FlyingText.defaultSize,FlyingText.defaultDepth,FlyingText.defaultResolution,FlyingText.defaultLetterSpacing,1.2f,
    18.                 FlyingText.defaultLineWidth, Vector3.zero, Quaternion.identity);
    19.     }
    20.    
    21.     // Update is called once per frame
    22.     void Update () {
    23.  
    24.     }
    25.    
    26.     void OnGUI(){
    27.        
    28.     }
    29. }
    30.  

    Error:
    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[System.Single].get_Item (Int32 index) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    FlyingText.GetObject (System.String s, UnityEngine.Material material, UnityEngine.Material edgeMaterial, Single size, Single extrudeDepth, Int32 resolution, Single characterSpacing, Single lineSpacing, Single lineWidth, Boolean prime, Boolean separateObjects, Boolean useObjectsArray, Vector3 position, Quaternion rotation, UnityEngine.GameObject gObject)
    FlyingText.GetObject (System.String text, UnityEngine.Material material, UnityEngine.Material edgeMaterial, Single size, Single extrudeDepth, Int32 resolution, Single characterSpacing, Single lineSpacing, Single lineWidth, Vector3 position, Quaternion rotation)
    Text3DTest.Start () (at Assets/Scripts/Text3DTest.cs:21)

    Thanks for your reply!
     
  22. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    What version are you using? That's fixed in 2.0.2. (Although I should point out that the justification settings won't do anything with one line of text, since there's nothing to justify to in that case. You may be looking for the anchor setting instead.)

    --Eric
     
  23. kunstar

    kunstar

    Joined:
    Jan 20, 2014
    Posts:
    2
    using 2.0.1. version

    Thanks
     
  24. njohn

    njohn

    Joined:
    Dec 7, 2013
    Posts:
    3
    Hi, first of all. Great tool, with clear documentation.

    This is not an issue for me, but I'm noticing the following build warnings. I'm using Unity 4.3.3f1

    Assets/Editor/FlyingTextInspector.js(27,34): BCW0012: WARNING: 'UnityEditor.EditorGUIUtility.LookLikeControls(float)' is obsolete. LookLikeControls and LookLikeInspector modes are deprecated. Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.

    Assets/Editor/FlyingTextInspector.js(70,34): BCW0012: WARNING: 'UnityEditor.EditorGUIUtility.LookLikeControls(float)' is obsolete. LookLikeControls and LookLikeInspector modes are deprecated. Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.

    Assets/Editor/FlyingTextInspector.js(142,34): BCW0012: WARNING: 'UnityEditor.EditorGUIUtility.LookLikeControls(float)' is obsolete. LookLikeControls and LookLikeInspector modes are deprecated. Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.

    Assets/Editor/FlyingTextInspector.js(155,30): BCW0012: WARNING: 'UnityEditor.Undo.RegisterSceneUndo(String)' is obsolete. Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.

    Assets/Editor/FlyingTextInspector.js(170,34): BCW0012: WARNING: 'UnityEditor.EditorGUIUtility.LookLikeControls(float)' is obsolete. LookLikeControls and LookLikeInspector modes are deprecated. Use EditorGUIUtility.labelWidth and EditorGUIUtility.fieldWidth to control label and field widths.
     
  25. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,807
    What I am trying to do is be able to download the font using a www, but it doesnt work unless its in the editor because its requiring it to be in the resource folder but its not saving it to the correct folder otherwise.
     
    Last edited: Feb 14, 2014
  26. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    There is no Resources folder in a build...assets are compiled into a .assets files, and are not available as individual files. If you want to use Resources.Load then the assets need to be built into the project.

    @njohn: yes, the next version will remove the warnings, though they have no actual effect on how it works. (For now.)

    --Eric
     
  27. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    And 2.0.3 is out, which removes the warnings.

    --Eric
     
  28. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Just a note that even though the version on the Asset Store claims to be 2.0.3, it's still the old version. I'm not sure why that happened, but I uploaded 2.0.3 again, so hopefully it will take this time.

    --Eric
     
  29. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    And it did...2.0.3 is available on the asset store for real this time.

    --Eric
     
  30. Cameron860

    Cameron860

    Joined:
    Jun 1, 2009
    Posts:
    764
    Does this support beveling yet?
     
  31. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Not yet, sorry.

    --Eric
     
  32. made-on-jupiter

    made-on-jupiter

    Joined:
    May 19, 2013
    Posts:
    25
    Hi Eric,

    just checking before I purchase: text can be created dynamically in the WebPlayer runtime, yeah? There are some methods in System.Text and Globalization that won't work in WebPlayer.
     
  33. Rinoa_Heartilly

    Rinoa_Heartilly

    Joined:
    Jun 26, 2014
    Posts:
    85
    so cool xD can you add more feature like we can have outline stroke - border for the text? users can use that to make really cool game titles :D
     
  34. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Yes, it works fine in the webplayer.

    Having borders is more something that you'd use for bitmap fonts; I'm not sure how that would work for 3D models, unless you use a toon shader maybe.

    --Eric
     
  35. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    New version:

    FlyingText3D 2.1

    Changes:
    • More accurate character placement. Note that this may change character spacing a little compared to earlier versions.

    Fixes:
    • Fixed inspector to work properly with Unity 4.0-4.2.
    • Character settings foldout works.
    • Fixed glitch in rendering for certain fonts where curves are constructed in a less-common way.

    --Eric
     
  36. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    A small update:

    FlyingText3D 2.1.1

    Fixes:
    • The fixed rendering glitch in 2.1 wasn't actually correct in all cases, so now that's fixed.

    Should be available on the asset store in a few days as usual.

    --Eric
     
  37. Pratap-Dafedar

    Pratap-Dafedar

    Joined:
    Aug 30, 2013
    Posts:
    19
    Hi StarSceneSoftware,

    I have gone through your FlyingText3D unity package and I really like the features and looks. So I have decided to buy it.

    - Is this package support all Unicode languages and generates text with dynamic fonts like ttf, rtf.
    - Can i get full source-code access with your plugin to modify and to adjust as per my need.
    - How is the performance on iOS, Since i need to generate text dynamically, just like textfield.

    Even if you suggest some work-arounds to accomplish my requirement, then I can do it from my side.

    Thank you.

    - Pratap.
     
  38. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    It works with TTF only, and all Unicode characters are supported as long as the font uses an encoding method that's supported (almost all do). The source is included. It works well and quite fast on iOS.

    --Eric
     
  39. RodL

    RodL

    Joined:
    Jul 3, 2014
    Posts:
    2
    Hi Eric,
    I am using FlyingText3D and I'm pretty happy with it.
    Except for one issue I'm having when using two FT-Inspectors in different scenes. In the second scene I'm loading the GetObject seems to use the settings from the first Inspector loaded (Also, the FlyingText Script has been removed and a new GO added with the old FT Script on it)
    Is this behaviour intended? I'm wondering whether it would be more logical to not replace existing Inspectors and only keep the old one if there is none in the new scene.
    Just pointing it out. I could of course just manually replace the settings in code (which is still a pain ;) )
    Thanks for the great work!

    Cheers
     
  40. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    That's a good point; it's currently not really intended to have different FlyingText inspectors in different scenes, so the settings from the first one are the "real" settings and are kept from one scene to another. I could add something like a "LoadSettingsFromCurrentInspector" function, which would save having to change all the settings in code.

    --Eric
     
  41. XeviaN360

    XeviaN360

    Joined:
    Jun 3, 2010
    Posts:
    181
    Hi, i was using your plugin since last two weeks.
    Now it stopped to work, i don't know if is an issue with Unity 4.5.3.p3 or with my project.
    Problem is when i drag a true type font (for instance COMIC.TTF) to the "Convert .ttf to .bytes utility" textbox and click "Convert" button, nothing happens: the bytes file is not generated anymore.
    Any advice?
    Thank you
     
  42. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    I can't imagine why it wouldn't work since all it's doing is renaming the .ttf to .bytes. You can do that manually if necessary.

    --Eric
     
  43. XeviaN360

    XeviaN360

    Joined:
    Jun 3, 2010
    Posts:
    181
    Thank you, great!
    Btw, i just figured it out. My TTF has the extension (.TTF) in uppercase. If i rename the file to lowercase extesion, it works ;)
     
  44. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Thanks for letting me know...I fixed that for the next version.

    --Eric
     
  45. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Version 2.1.2 is out, which addresses the TXT/txt thing as well as Unity 5 compatibility.

    --Eric
     
    HansBernd likes this.
  46. fastfoodi

    fastfoodi

    Joined:
    Dec 11, 2014
    Posts:
    1
    What he said^! :)

    Great plugin just the same, though. Thoroughly surprised this isn't a default Unity feature.
     
  47. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    New version:

    FlyingText3D 2.2

    Additions:
    • "Compute Tangents" option, for materials that require tangents (such as bump mapping).

    Fixes:
    • Vertical text formatting doesn't gradually offset the horizontal letter position.

    --Eric
     
  48. OOLE

    OOLE

    Joined:
    May 13, 2015
    Posts:
    14
    Hi Eric,
    does this plugin support the WebGL platform and work in the 64-bit editor? I ask, because i had issues with another 3d text plugin.
     
  49. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    Yep, it's fine. It's plain C# so it doesn't have issues like external native code plugins do. (The only issue is on WP8, since that uses .NET rather than Mono, is missing certain functionality, and I wasn't able to find out what the replacement should be.)

    --Eric
     
  50. OOLE

    OOLE

    Joined:
    May 13, 2015
    Posts:
    14
    Cool thx for the info and this nice asset :)