Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm looking for a way to write a typed text on a texture, and then render it on a screen: in the game it's just the screen of a computer where a scientist is typing text on.

The texture will be already generated: it will have several textures in it.

I can't find any obvious way to do a simple render to texture with unity, how could I do that ?

share|improve this question

2 Answers 2

You can also just texture directly with an .mov, .mpg, .avi and so on.

Details here: Movie Texture

NOTE: Texturing with a video file is only available in Unity Pro and isn't supported on iOS/Andoid

share|improve this answer

I don't think you can use render textures in anything but Unity Pro. But assuming you have that...

http://unity3d.com/support/documentation/ScriptReference/Camera-targetTexture.html

Basically set up a camera pointing to whatever you want your render texture to be. You can set up layers so that you camera can only see things on a certain layer instead of having to have it off in the middle of nowhere. You then just have your screen's texture point to that render texture you've created.

Then you can just point the camera to whatever you want. If you want to just swap between textures it would be pretty easy to write a script to cycle some object to go between textures. You could also do it dynamically with 3D text if you wanted to save on texture space (and assuming you already had a font texture loaded).

share|improve this answer
    
In fact my initial problem is more like "animated texture" than render to texture. I feel dubious about the term, but I don't think I want something that resembles a surveillance camera. –  jokoon Feb 4 '11 at 16:28
2  
Well in that case you just want a script that updates the texture over time. void Update() { if( Time.time > timeToNextTexture ) { renderer.material.mainTexture = nextTexture; } } –  Tetrad Feb 4 '11 at 17:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.