본문 바로가기

Unity

Unity tips for Beginner (1) - StreamingAssets

Some parts you may need to change after you build your project.

So This is a simple code for reading some data from txt file.

Put them into a txt file inside of StreamingAssets folder.

 

Here is what I did for my project.

I needed to change IP and PORT number so I made it in this way before I build it.

 

Line 1 : Explanation for Line2

Line 2 : Value explained from Line 1

Line 3 : Explanation for Line4

Line 4 : Value explained from Line 3

Detail in Settings.txt from StreamingAssets folder

https://github.com/SoftwareDevJake/StreamingReader/blob/master/StreamingReader.cs

 

GitHub - SoftwareDevJake/StreamingReader

Contribute to SoftwareDevJake/StreamingReader development by creating an account on GitHub.

github.com

Using code from the top link then it's done!

If you need more lines, just add new ones with "else if".