Closed jpur closed 7 years ago
Thanks for the bug report. I was able to reproduce and fix. It will be available (hopefully soon) in the next version of Tiled2Unity.
FWIW, replacing the ReadyToWrite
method in ImportUtils.cs
with this will get .NET 4.6 working for you if you don't want to wait ...
public static void ReadyToWrite(string path)
{
// Creates directories in path if they don't exist
FileInfo info = new FileInfo(path);
info.Directory.Create();
// Make sure file is not readonly
if (info.Exists)
{
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
throw new UnityException(String.Format("{0} is read-only", path));
}
}
}
FYI: Version 1.0.12.4 of Tiled2Unity contains the fix for this.
When using the .NET 4.6 runtime available in the newest Unity version, Tiled2Unity seems unable to export tilemaps and throws errors like this:
Reproduction: Make a new Unity project, set the Scripting Runtime Version to .NET 4.6 and try exporting a tilemap to get an error. Switch it back and it imports fine.