- Home /
How to use texture from a dynamic font ?
Hello,
I'm currently working on a project where I have to draw texts on texture2D objects. I've search and find some information about how to do this, and I've been able to do it without problem with "static" font, by marking their texture as "Read/write enabled" in the inspector.
But in my project, I need to use many size of fonts and I can't create a new static font for every size. So, I want to use a dynamic font and read from it... but I can't, as dynamic font's texture isn't marked as "Read/write enabled". I've tried to create a copy of my font's texture, but I can't do this either.
So, I'm looking for a way to read datas from my dynamic font's texture, without turning it to a non-dynamic font (the best thing would be if I was even able to do it without copying it, so I can use the default GUI's font for this).
Is there any way to do this ?
Thank you !
I strongly recommend this pipeline for anything to do with Fonts in Unity3D
http://answers.unity3d.com/questions/464453/dynamic-font-on-android-cant-display-some-texts.html
Thank you, but this is not really a solution. As I've said, I can already do what I want with usual font. What I want to do is render dynamic font to Texture2D, not to an object...
Hi,I have the same problem on the Dynamic Font ? I can't draw the font in the normal .
The problem is : how can i draw the 'W' in the right way. Thank you ,pardon me my pool english skills.
Answer by Graham-Dunnett · May 30, 2013 at 09:17 AM
Dynamic fonts create textures deep inside Unity and these are not accessible through the API. Render your fonts to a render texture, then use those in your GUI.
That would be perfect... except that I only have a free version of Unity :/ But thank you for the advice :)