Unity3D GameEngine in crashing

Hi.

I use temp license Aspose.pdf for .Net(C#).

Also, Developer for Unity3D.

I plug-in dll file to "Aspose.pdf.dll".

However, TypeLoadException in Unity, and excute being crash bug

This <?xml:namespace prefix = daum ns = "http://dic.daum.net/" />Aspose.pdf is not compatible with the Unity3D Engine?

crashing context is "pngDevice.Process(pdfDocument.Pages[pageCount], imageStream);"

Hi Rusiela,


Thanks for your inquiry. I’m afraid we don’t have any known compatibility issue with Unity3D Engine. As Aspose.Pdf for .Net Api based on .Net Framework it should work with related applications. Could you please share your sample code/Project here? So we test it at our end and provide your more information accordingly.

Sorry for the inconvenience faced.

Best Regards,

Hi!

Aspose.PDF for .NET isn’t fully compatible with Unity3D because Unity uses a customized version of the Mono runtime, which sometimes causes issues with certain .NET libraries—especially those relying on advanced system features or specific dependencies.

The TypeLoadException and crash at pngDevice.Process(pdfDocument.Pages[pageCount], imageStream); suggest that the library is trying to use something not supported or missing in Unity’s environment.

A few things you could try:

  • Make sure you’re using the .NET Standard or .NET Framework version of Aspose.PDF that is closest to Unity’s runtime (usually .NET Standard 2.0).
  • Check if Aspose offers a Unity-compatible package or any guidance for using their PDF libraries in Unity.
  • Consider converting the PDF pages to images outside of Unity (on a server or separate tool) and then importing the images into Unity.
  • Look for alternative PDF libraries specifically designed for Unity, since many .NET PDF libraries are not fully compatible.

Unfortunately, Aspose.PDF is quite heavy and not originally designed for Unity, so these crashes are common. If your project requires PDF processing inside Unity, you might need a workaround or a lighter PDF solution.

@Offeacy61

Are you facing some issue similar to this? Can you please share some code snippet and sample files with us that we could use to investigate the issue and address it accordingly?