Hi, im trying to tell if a file exists. I know the file is there, but it is just returing that its not. What have i done wrong? Here is the full code.
using UnityEngine;
using System.IO;
public class handleData : MonoBehaviour {
public static string datapath;
public static string correct;
void Start()
{
datapath = Application.dataPath;
}
public static string HandleLogin(string username, string password)
{
if (File.Exists(datapath + "/Resources/" + username + ".xml"))
{
correct = "ok";
}
else
{
correct = "fail";
}
return correct;
}
}