Free Support Forum - aspose.com

Aspose.GIS + Unity

Hi,
we are going to use your GIS product in our Unity project, but first, we wanna try does Aspose.GIS works with Unity correct, so we download free demo DLLs from the next URL:
https://downloads.aspose.com/gis/net/new-releases/aspose.gis-for-.net-20.4-(dlls-only)/

this zip file collects only Aspose.GIS.dll and we have assembly missing errors:

Assembly ‘Assets/Plugins/Aspose.GIS.dll’ will not be loaded due to errors:
Unable to resolve reference ‘Aspose.FileFormats.Core’. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference ‘Aspose.FileFormats.Tiff.Core’. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference ‘Aspose.Imaging’. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.

so it looks like we need more Aspose DLLs for correct work.

Hello, @oleksiim

Thank you for your interest in the Aspose.GIS product.

We reproduced the issue in 20.04 version. And we have logged an investigation ticket as GISNET-532 in our issue tracking system.

However, It is possible to use the Aspose.GIS 20.3 (DLLs only) in your Unity project. Instructions for unity: Create a folder in assest called ‘Plugins’: unity use this folder to load your external DLLs, if you put here, unity install the DLLs automatic, and you just need to add Using yourDLL in your project and it works.

Note: Aspose.Gis NETStandard 2.0 has Dependencies: System.Drawing.Common (>= 4.5.1). It need to include too into the ‘Plugins’ folder.

Best regards.

1 Like

Hi, @Evgeniy.Timofeev

thank you for a quick response,
I just downgraded the GIS version to 20.3 and it solves the previous exception. But I have a new one with SpatialReferenceSystem.CreateFromWkt, I use WKT from your examples:

string wkt = @"
GEOGCS["“WGS 84"”,
DATUM["“WGS_1984"”,
SPHEROID["“WGS 84"”,6378137,298.257223563,
AUTHORITY["“EPSG”","“7030"”]],
AUTHORITY["“EPSG”","“6326"”]],
PRIMEM["“Greenwich”",0,
AUTHORITY["“EPSG”","“8901"”]],
UNIT["“degree”",0.01745329251994328,
AUTHORITY["“EPSG”","“9122"”]],
AUTHORITY["“EPSG”","“4326"”]]

var srs = SpatialReferenceSystem.CreateFromWkt(wkt);

but I have the next exception:

InvalidProgramException: Method : () is too complex.
…cctor () (at :0)
Rethrow as TypeInitializationException: The type initializer for ' ’ threw an exception.
. (System.Int32 , Aspose.Gis.SpatialReferencing.SpatialReferenceSystem& ) (at :0)
Aspose.Gis.SpatialReferencing.SpatialReferenceSystem. (System.Int32 ) (at :0)
Aspose.Gis.SpatialReferencing.SpatialReferenceSystem…cctor () (at :0)
Rethrow as TypeInitializationException: The type initializer for ‘Aspose.Gis.SpatialReferencing.SpatialReferenceSystem’ threw an exception.

So, I have the same exception on 20.3, 20.1, 19.12 GIS versions and it works on 18.4, 18.12.1 GIS versions. I didn’t try all versions just this few.

Hello, @oleksiim

Seem, Unity can’t parse some parts of Aspose.GIS library (work with EPSG database).

We will consider ways to make our internal code simpler. We have created a ticket GISNET-533 and will update you here as soon as additional information is available regarding this.

Thanks.

1 Like