Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to use individual textures as font in GUI?

Discussion in 'Immediate Mode GUI (IMGUI)' started by JanDawid, Sep 19, 2015.

  1. JanDawid

    JanDawid

    Joined:
    Jul 7, 2014
    Posts:
    283
    I can't phrase it too well in the question title, but what I basically want is to use hand-drawn textures as characters rather than a font file for font in my GUI. At least from what I can tell, font text can only be one color, and honestly this looks dull in a game. What I want to use is my own font in which I draw out each character, save each one as an individual texture and then use those textures as 'font' with GUIText, if that makes any sense.

    I have, once before, wrote a script that takes in a string, reads it character by character and displays the texture relevant to each letter (so it basically worked like a font). Only problem is was that it wasn't for GUI, which is what I want to use it in now. Any way to do this? Or simply apply the same method but use GUITextures instead?