Esempio n. 1
0
    public static string makeFullPath(string strFileName)
    {
        string strFullName = "";

        if (strFileName == null)
        {
            return(null);
        }
        strFullName = Path.Combine(MonoTool.GetPersistentPath(), strFileName);

        //对该路径进行检测,如果没有找到,就为他尽量指定一个默认路径
        if (File.Exists(strFullName))
        {
            //Debug.Log("file find at manu folder,path is" + strFullName);
            return(strFullName);
        }
        else
        {
            //Debug.Log("file not find at the path : " + strFullName + " ,using File.Exists for test");
            strFullName = MonoTool.GeDataPathHeader() + Path.Combine(MonoTool.GetDataPath(), strFileName);
            //Debug.Log("change path to system path :" + strFullName);
        }

        //Debug.LogError("makeFullPath:" + strFullName);
        return(strFullName);
    }
Esempio n. 2
0
 public static string GetDataPath()
 {
     if (m_DataPath != "")
     {
         return(m_DataPath);
     }
     m_DataPath = MonoTool.GeDataPathHeader() + MonoTool.GetDataPath();
     //Debug.LogError("getSystemPath:" + path);
     return(m_DataPath);
 }