# How to procedurally generate materials with text in Unity

I'm designing a virtual library that dynamically loads sections of a database and need to display text on the books. As such, I need a runtime interface to somehow load book titles and author and put them on the book covers.

I've looked into Substance Designer to make a procedural material, but the Text Node in the program is not yet supported by Unity. I've also stumbled across TextGenerator in the Unity API, but it seems to be mesh not texture based, and I'm not sure what the performance penalty will be, given I'm rendering a lot of books.

Edit: For now I had some luck creating a child object and using the TextGenerator, since it turns out the mesh is minimal and in fact does create a texture to display the text. I suppose I can use this solution until something better comes up.

• I figured out how to render text to the screen manually (raw OpenGL) once about...year and a half ago? Took a few days, but it wasn't that hard. I think the same process could render to a texture too, but I haven't done that much texture-modification work. – Draco18s May 20 '17 at 22:34
• To clarify: are you displaying predetermined text (i.e. strings loaded from your database) or are you dynamically composing the text at runtime? – Pikalek May 21 '17 at 3:44
• Predetermined text from the database, I updated the question with a new workaround I found – jeanluc May 31 '17 at 1:08
• If that solved your question, you should post it as an answer & accept it. If it doesn't solve your problem, please elaborate as to how your temporary solution fails to adequately solve the problem. – Pikalek May 31 '17 at 1:26