GetStringFromFileInPackage /File I/O

string GetStringFromFileInPackage(string fileName)

Returns the entire content from a file as a string. This function looks for the file in the game package (packed into Android apk files, iOS App bundle or the current package from which the application is getting its resources).

Currently, Android is the only platform that packs all application resources in a zip package. When this function is used on other platforms that do not zip application resources, it will behave just like the GetStringFromFile function. Always using this function to load resources that are bundled with the game original package is recommended for cross-platform safety.

If it fails, an empty string is returned.

Sample:

const string resourceDir = GetResourceDirectory();
const string content = GetStringFromFileInPackage(resourceDir + "my_file.txt");