diff --git a/Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkEditorCommandUpdater.cs b/Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkEditorCommandUpdater.cs index f3b2cc06a..a59fbc90b 100644 --- a/Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkEditorCommandUpdater.cs +++ b/Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkEditorCommandUpdater.cs @@ -30,11 +30,6 @@ private string GetCommand() //Debug.Log($"fromPath {fromPath}"); //Debug.Log($"appPath {appPath}"); //Debug.Log($"relPath {relPath}"); - -#if UNITY_EDITOR_OSX - //on mac, the command needs to have this in the front: sudo chmod a+x - relPath = "sudo chmod a+x " + relPath; -#endif return relPath; } diff --git a/Assets/LDtkUnity/Editor/Utility/LDtkTilesetExporterUtility.cs b/Assets/LDtkUnity/Editor/Utility/LDtkTilesetExporterUtility.cs index c38c84aa1..ab7557fe6 100644 --- a/Assets/LDtkUnity/Editor/Utility/LDtkTilesetExporterUtility.cs +++ b/Assets/LDtkUnity/Editor/Utility/LDtkTilesetExporterUtility.cs @@ -33,6 +33,12 @@ public static void UnzipToLibrary() Debug.Assert(Directory.Exists(destDir), "Directory.Exists(destDir)"); ZipUtil.Extract(pathToZip, destDir); + +#if UNITY_EDITOR_OSX + //on mac, the app needs some permission. Use "sudo chmod +x" + Process.Start("/bin/bash", $"-c \" chmod +x {PathToExe()}\" "); +#endif + LDtkDebug.Log($"Extracted the tileset export app to \"{destDir}\""); }