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:

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

Hello, @Evgeniy.Timofeev
Do you have any updates about GISNET-532 and GISNET-533 tickets?

Hi, @oleksiim

We spent a few time to analyze this problems. But the GISNET-532 and GISNET-533 tickets have not been fixed yet. Sorry!

Hello, @Evgeniy.Timofeev
Do you have any updates about GISNET-532 and GISNET-533 tickets?

Hi, @oleksiim

We still cannot pay attention to solve a problem with the Unity platform.

Are you developing your application on phones or just for the desktop? We can look for a workaround if you use desktop development only.

Thanks.

Hi, @Evgeniy.Timofeev
We are developing for mobile platforms but the “method is too complex” reproduces only at Unity Editor so it is a desktop platform. We really neet Editor support because we have a lot of tests and they don’t work correctly so it is impossible for our team to do quality assures.

Do you use “Aspose.FileFormats.Core” like separate NuGet? Because Unity can’t find a reference to this “Aspose.FileFormats.Core”.

In which NuGets we can find “Aspose.Foundation”, “Aspose.FileFormats.Core” and “Aspose.FileFormats.Tiff.Core”?

Also, I .Net developer can I help you?

Hello, @oleksiim

We combine all internal assemblies in the Aspose.Gis.dll file. The unfound assemblies are internal. Therefore, NuGet packages do not exist.

To resolve the error, we need to fix the assemblies merging than we modified in the 20.04 version.

Seems, the unit editor has its own Package Manager. Perhaps it has any settings to change the loading way of assemblies, just like in Visual Studio. Here maybe I’m wrong.

Thanks.

3 posts were split to a new topic: Rendering text to PNG via Aspose.Words API in Unity project