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

How to set a font texture (to allow a custom shader with 3d text)?

Discussion in 'Editor & General Support' started by JeffersonTD, Oct 1, 2014.

  1. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    267
    I'm having the somewhat common problem of making the 3D texts to not appear on top of everything. So I have a 3D Text shader attached to a new material, and when using that it doesn't render the text on top of everything. So that works.

    But how do I make the material have the font texture? I have made a "3DFontMaterial", but when I try to select the font texture for it, the selection window doesn't show the font textures I can otherwise see under the font .ttf's I'm trying for testing purposes. So I'm only able to have a render-through-everything text with a working font or a messed-up text that's not rendered through everything. How to fix this?

    I'm also quite not clear on what's the purpose of the font material in the first place. I mean the font gives you the shape of the letters right? I would have thought that the material would just tell how to paint that shape (eg. all white), but it would seem that it can in principle also affect the shape. So if it's not for the painting purpose, why do you need both the material and the font?
     
  2. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    267
    Ok, managed to make the font. The problem was that you can't edit the material of a .ttf directly, but you need to make a copy of it instead.
     

    Attached Files:

  3. VishrutiFaldu

    VishrutiFaldu

    Joined:
    Feb 21, 2022
    Posts:
    4
    @JeffersonTD Hello, can you explain how exactly did you manage to copy the materials? Thanks :)