private static LoadTextFromResources ( string path ) : string | ||
path | string | |
Résultat | string |
private static string LoadTextFromResources(string path)
{
string data = null;
var resource = Resources.Load(path) as TextAsset;
if (resource != null)
{
data = resource.text;
}
else
{
Debug.LogError("error loading text file from resources " + path);
}
return data;
}