Using a text file instead of typing in a script.

Hi folks, I have a text (.txt) file with a lot of info in it and it would be far easier for me to use that instead of having to type it all out again/C&P and format it with /n and such. They are the only ways I know of how to do it but is there a way for me to “import” my text file in to Unity at runtime?

Regards,

Cas

use the www class

Does it actually have to be imported at runtime, or is it just that you want to use a text file as an asset?

var myTextFile : TextAsset;
...
var aBunchOfText = myTextFile.text;

–Eric

Nah it doesn’t have to be imported at runtime (I shouldn’t have put that really). Thanks to both of you for replying =].

Cas.