Beispiel #1
0
    static void ClearAllLuaFiles()
    {
        string osName = BuildUtil.GetBuildOsDir(target);//win

        string osPath = Application.streamingAssetsPath + "/" + osName;

        string buildPath = BuildUtil.GetBuildDir(target);

        string resPath = Path.Combine(buildPath, "/lua");

        if (Directory.Exists(osPath))
        {
            string[] files = Directory.GetFiles(osPath, "Lua*.unity3d");

            for (int i = 0; i < files.Length; i++)
            {
                File.Delete(files[i]);
            }
        }

        if (Directory.Exists(resPath))
        {
            Directory.Delete(resPath, true);
        }

        string path = osPath + "/Lua";

        if (Directory.Exists(path))
        {
            Directory.Delete(path, true);
        }

        path = Application.dataPath + "/Resources/Lua";

        if (Directory.Exists(path))
        {
            Directory.Delete(path, true);
        }

        path = FXGame.AppConst.GetAppDownDir() + "/" + osName + "/Lua";

        if (Directory.Exists(path))
        {
            Directory.Delete(path, true);
        }
    }
Beispiel #2
0
    public static string GetBuildDir(BuildTarget target)
    {
        string dir = "";

        if (target == BuildTarget.StandaloneWindows)
        {
            //    F:/ MyGame / Assets
            dir = Path.Combine(Application.dataPath, "../AssetBundles");
        }
        else if (target == BuildTarget.Android)
        {
            dir = @"D:\myfxgame_xl";
        }
        else if (target == BuildTarget.iOS)
        {
            dir = "/Users/Shared/myfxgame";
        }
        return(Path.Combine(dir, BuildUtil.GetBuildOsDir(target)));
    }