ReadFileLines

void ReadFileLines(string inFileName)

Description

This function is a Asynchronous function enabling to read the text seperated into lines in a given file saved on the device / PC.
As the function is Asynchronous, when the file is actually read the callback function void OnReadFileLinesResult(String inFileName, bool inSuccess, String[] inFileLines) is called
and it includes the filename, success (read or not) and a String array of the lines in the file it read.
You need to override it in your Advanced Scripts to perform what you need in case of failure or perform any action with the read text.

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inFileName string The full file path


Return Type

void

Example

ReadFileLines("$ROOT$/MyTxtFile.txt") will open the file "MyTextFile.txt" that is saved under the Root directory on the device, and read the text that is written in this file.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.