Hi there !
I'm a beginner and I'm workin on a project using Unity3D to create a 3D-book.
(I know Unity3D is designed for games but it looks powerful enough to do this ..)
I come up with this question about how to load *.txt files and display the text on the surface of a book model (My thought is to use 3DText but I'm not sure about it)
Could someone help me ?
Thanks a million !
in fact I'm not a native English speaker . I mean I'm a foreigner college student. please forgive me of my poor way of expressing. I need help asap. I'm messed up with the rules here at this site.. forgive me again.
First - if your pages aren't dynamic, and the application is thought for offline use (can be bigger size), you should think about using textures only. Create your text in any application and export the page as standard texture, this is by far the easiest way.
But in every other case ---
You require UnityPro for my way to achieve this. I have used it myself for an interactive typewriter, where the text was written by the user and directly assigned to the paper.
Set up a new camera. Set up a GUIText object.
Put this GUIText object in a new layer (select a custom layer for it).
Tell your camera to only render that layer; set the camera's background color to white and your text color to black, select the right font etc.
Create a new RenderTexture and assign it to the camera.
Import your *.txt file (look at the comments and other answers) and assign it to the GUIText objects text variable.
You can now use this RenderTexture like every other texture - for example, assign it as MainTexture to your book pages.
answered Jul 26, 2010 at 10:16 PM
How to readva text file is answered here - http://answers.unity3d.com/questions/5185/help-me-about-reading-txt-file
answered May 17, 2010 at 05:34 PM