- Home /
Import text into unity
Is it possible to import text to unity using a .java program?
Like a java program System.out.print("hello");
To import that into unity?
So What would you say i do I have a VERY basic java program to test, it just outputs "hello world" and i want that to somehow get into my unity project as "hello world"
Answer by MangoDerp · May 03, 2012 at 03:24 AM
You can write code in your C# script to read from a text file (im not sure about JS syntax). Be sure to put the text file into the Resource folder in your Assets folder. Im not sure why you would want a seperate program to read the text.
write a c# or javascript in you game to read the text file.
Answer by Graham-Dunnett · May 06, 2012 at 08:09 PM
Text files can be read into Unity as MangoDerp says, by treating them as Text assets. Unity can read a .java file as a text asset, however, the code that the java file contains cannot be "executed/compiled/run".
Your answer
