public static void BuildAllAssetBundle()
    {
        bool state = true;

#if UNITY_EDITOR
        state = EditorUtility.DisplayDialog("依赖关系生成选择框", "是否确认重新生成依赖关系,不能确认请点击OK。", "OK->重新分析资源依赖关系", "Cancel->直接打包AssetBundle");
#endif
        if (state)
        {
            ToLuaMenu.ClearLuaFilesFromSrcPath();
            ToLuaMenu.CopyLuaFilesToSrcPath();

            AssetDependenciesAnalysis analysiser = new AssetDependenciesAnalysis();
            analysiser.AnalysisAllAsset();
            //tips:Unity5.x Scripts not need to build AssetBundle
            //analysiser.BuildAllScripts();
        }
        BuildAssetBundle();
    }
    public static void BuildLua()
    {
        ToLuaMenu.ClearLuaFilesFromSrcPath();
        ToLuaMenu.CopyLuaFilesToSrcPath();

        string[] allPath = Directory.GetFiles(FilePathUtil.resPath + "Lua/", "*.*", SearchOption.AllDirectories);

        //剔除.meta文件;
        List <string> allLuaAsset = new List <string>();

        foreach (string tempPath in allPath)
        {
            string path = tempPath.Replace("\\", "/");
            if (Path.GetExtension(path) == ".meta")
            {
                continue;
            }
            allLuaAsset.Add(path);
        }
        int index = 0;

        foreach (string tempPath in allLuaAsset)
        {
            index++;
            EditorUtility.DisplayProgressBar("Set Asset AssetBundle Name", "AssetBundle Name Setting Progress", (index / allLuaAsset.Count));
            AssetImporter importer = AssetImporter.GetAtPath(tempPath);
            if (importer != null)
            {
                importer.assetBundleName = FilePathUtil.GetAssetBundleFileName(AssetType.Lua, "Lua");
                AssetDatabase.ImportAsset(tempPath);
            }
        }
        EditorUtility.ClearProgressBar();

        //tips:Unity5.x Scripts not need to build AssetBundle
        //analysiser.BuildAllScripts();
        BuildAssetBundle();
    }