Hi
I have come across this problem a couple of times now, and was wondering if anyone out there had a solution and iv’e just missed it
I need to render text to texture
here are some of the solutions i have already ruled out:
1: Using render texture
while the whole process of rendering the screen to a texture in order to just get a text that is created through GUI seems a little bit overkill it could get the job done and almost makes the use of the pro feature worthwhile, however this feature does not work on mobile platforms so it’s a no go
2: Bitmap font
Atleast there is a SetPixel() function so it would be possible to write a custom bitmap font renderer, we already have a whole library of various windows, gradients and stuff implemented this way. Adding this extra functionality shouldn’t be too much of a hassle IF only the game weren’t in Chinese, even if we narrowed the bitmap font down to the characters that are actually used in the game it would still be HUGE!!
3: Referencing the System.Drawing assembly
.NET provides text rendering, however it’s not referenced as default in Unity, as far as i know this could be achieved with Unity Pro, but i’m afraid the .NET implementation uses GDI, and that will not work on mobile platforms? correct me if i’m wrong
4: Writing a custom font rasterizer
I guess that could be achieved, but then again why a’m i using an Engine?