ReadFileText

void ReadFileText(string inFileName)

Description

This function reads the text in a given file saved on the device / PC.
As the function is Asynchronous, when the file is actually read the callback function void OnReadFileTextResult(String inFileName, bool inSuccess, String inFileText) 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 perfrom 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

ReadFileText("$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.