Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

3D text in Unity is 2 dimensional. Can real 3D font be made?

Discussion in 'Editor & General Support' started by ARUnityAccount, Dec 23, 2015.

  1. ARUnityAccount

    ARUnityAccount

    Joined:
    Dec 10, 2015
    Posts:
    8
    There have been posts on this topic from years past but the links are all worn out nowadays.

    Unity 3D text is 2 dimensional. There is a heigh and width, but no depth.

    My app has a "score". The score is in 3D text, but we know that this is really 2D. This score is fed data from collision events to grow. This means that I can't just drag and drop 3D models into my world.

    I only need the numbers, 0 through 9. I created them in Blender already.

    I know that the asset store offers something like this. I need the ability to shape and texture my own font.

    I'm struggling to figure out how I'll Jimmy rig this. My solutions seem way too complicated. Is there a way? Has anyone done this?

    I appreciate the responses.
     
  2. ARUnityAccount

    ARUnityAccount

    Joined:
    Dec 10, 2015
    Posts:
    8
    My score is in increments of 10. So What I'm thinking is, do like 1000 if statements where it goes,
    if (score == 10) {
    Place model in this exact spot
    }
    if (score == 20) {
    Place different model in this exact spot
    }
    ...

    That is the only solution I can think of
     
  3. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    The unity 3D text is only 2D text in 3D space.
    If you want 3D extruded text in realtime, you could take a look at this tool. It sould work fine with whatever font you provide for it.
    ttp://u3d.as/3aa

    If you just fine with premade meshes from blender, that's a nice way to do it too.

    ps: you do not need to write 100 if statements , that would make no sense.
     
  4. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    There are loads of ways of doing it. Here is an example:

    Convert the number to a string.

    Instantiate a model representing each character, offset according to the position in the string.
     
  5. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    If you have models for 0-9 and all you need is to put numbers from 0 to 4 billion or so, some simple code could do it using loops and things like (score % 100)/10 to get the 2nd last digit, (score % 1000) / 100 to get the 3rd last etc.

    If you want to support an entire font in 3d, you're best of to find a plugin / asset that does this for you.