Exemple #1
0
 public void setInfo(BuildTarget target)
 {
     _target    = target;
     _targetDir = Application.dataPath + "/../" + abpathname + builddict[_target];
     XUtil.assureDirectory(_targetDir);
     if (!Directory.Exists(_targetDir))
     {
         Directory.CreateDirectory(_targetDir);
     }
 }
Exemple #2
0
    public bool saveFile(string fileName)
    {
        try
        {
            string result = save();
            XUtil.assureDirectory(fileName);
            FileStream fs   = File.Open(fileName, FileMode.Create);
            byte[]     data = new UTF8Encoding().GetBytes(result);
            fs.Write(data, 0, data.Length);
            fs.Close();
        }
        catch (Exception e)
        {
            XDebug.LogError(e.Message);
            return(false);
        }

        return(true);
    }