Error export tiled to tiled2unity


(Windy Rahmadia Pradanita) #1

I got this messages error when I export my tiled to tiled2unity :

The type initializer for ‘SkiaSharp.SKImageInfo’ threw an exception.

what should I do?


How do I export the map in xml
(Seanba) #2

What OS are you using and are you using 32 bit or 64 bit versions of Tiled2Unity?

(FWIW, the only time I’ve seen that exception (so far) was when someone was building their own version of Tiled2Unity in Visual Studio and was using the ‘Mixed Platforms’ configuration.)


(Leon Moctezuma) #3

Maybe you want to try Tiled4Unity. It’s almost the same code from Sean’s importer it just makes the importing process within Unity and you don’t have to build any intermediate program.


#4

I got the same error message. I tried both 32 and 64bit versions on a windows 10 machine. The message appeared whenever I tried to open a tmx map in the tiled2unity window.

I couldn’t work out how to runTiled4Unity either, there seemed to be no instructions and no executable.


(feiweixin) #5

Opening C:\Program Files (x86)\Tiled2Unity\Examples\hex-pointy.tmx …
Parsing map root …
Parsing tileset elements …
Parse internal tileset ‘hex-pointy-60x52’ (gid = 1) …
“SkiaSharp.SKImageInfo”的类型初始值设定项引发异常。

Loading summary
Succeeded: 0
Warnings: 0
Errors: 1
“SkiaSharp.SKImageInfo”的类型初始值设定项引发异常。


#6

It works now.

The problem disappeared, I’m fairly sure after I installed GTK-sharp from this website,

http://www.mono-project.com/download/#download-win.


(Seanba) #7

FWIW I’m working on a version of Tiled2Unity that will handle Skia Sharp exceptions a bit better. It will disable previewing but at least you’ll still be able to export.

I’m also updating the Skia Sharp version so, with luck, this kind of issue will be fixed with the upgrade.