Creating Dynamic Textures

Hi,

I’m new to Unity and the forums and I’m looking for some help.

I’m trying to create textures that are rendered from a separate camera that can be used on other objects in the scene. These textures need to have text created from different sources such as another variable or reading in a file.

Can anyone give me any tips or pointers on how to start? Also, if anyone knows a better way of dynamically creating textures with text, please tell me.

I had a very similar problem a while back when creating a website for a friend of a friend. It turned out that I had to use php to create the image via command line and it worked absolutely perfectly.

I know unity uses .Net and I have read that a lot of libraries area available under .NET but I know nothing of.NET apart from Strings. Is there a way of creating images from text via command line functions calls in .NET ???

I don’t remember exactly but it went something like:

x = fontx;
s = CreateString(text, x, fontSize);
z = s.pixelWidth;
i = createimage(z, x.fontPixelHeight)
i.DrawText(s);
i.SaveImage();

Can this be done in Unity? That would be absolutely awesome…

What you’re looking for is a Render Texture (Pro only).

how does one render dynamic text of various lengths onto a texture using pro?

I’ve actually got the text to show up depending on a string variable you can set. Now I’m looking for a way to export the render texture into a .png file or something similar. Is there are way to do so?