unity read text file
// This is how I read a textfile, contained within the Resources
// folder:
TextAsset textFile;
string text;
string[] lines;
textFile = Resources.Load(fileName) as TextAsset; // Loads file
text = textFile.ToString(); // Converts to string
lines = text.Split('\n'); // Splits per newline
// Do something with it
Also in C#:
- grab reference from method parameter c#
- how to reload app.config file at runtime in c#
- reload scene unity
- order by C#
- unity read text file
- same click event diffrenet buttonms c#
- mysql executeScalar only if successful
- razor concatonate inline
- how to cast list to observablecollection c#
- c# two dimensional array
- make a list c#
- unity random float
- Rigidbody.addforce
- c# creating exceptions
- c# listview
- c# get type of object
- c# select first value from list
- C# enum
- Unity C# make object face away
- how to create and trigger a function unity animation events
- out parameters c#
- button commandfield commandargument pass textbox
- c# bitmap to Image
- asp.net core timeout