Beispiel #1
0
 public static void CompileLua(string dllName, string dllDir, string outDirName, List <string> referencedLuaAssemblies, bool isModule)
 {
     LuaCompiler.Compile(dllName, dllDir, outDirName, referencedLuaAssemblies, isModule);
     FileHelper.ReplaceExtensionName(LuaCompiler.outDir + outDirName, LuaExtensionName, LuaTxtExtensionName);
     ABNameEditor.SetFolderLuaABName(LuaCompiler.outDir + outDirName);
     AssetDatabase.Refresh();
 }
Beispiel #2
0
        //[MenuItem("Tools/Lua/Replace the all \".lua.txt\" file of the selected folder with \".lua\"")]
        public static void ReplaceSelectedFolder()
        {
            var assetGUIDs = Selection.assetGUIDs;

            foreach (var guid in assetGUIDs)
            {
                var assetPath = AssetDatabase.GUIDToAssetPath(guid);

                if (Directory.Exists(assetPath))
                {
                    var outDirName = assetPath.Substring(assetPath.LastIndexOf("/") + 1);

                    FileHelper.ReplaceExtensionName(LuaCompiler.outDir + outDirName, LuaTxtExtensionName, LuaExtensionName);
                }
            }

            AssetDatabase.Refresh();
        }