Can anybody help me out with giving the steps needed for reading data from the text file in unity and how can the script be added.
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.
|
C# Version.
|
|||
|
There's class named TextAssets which is used for text file read. http://docs.unity3d.com/Manual/class-TextAsset.html here you can find the supported file format. so if u want to read read the text file, script would be like this:
or you can read the text as resource like this:
|
|||||
|
You can do this in the same way you would in .NET
This code snippet can be used in any location you wish then. |
|||
|
This code is working fine for me to read the content in the text file
|
||||
|