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.
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.
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:
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.
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.
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”?
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.