Hello, I've bought the PDFViewer asset from the Unity store to show PDF inside in device, but I've encountered a problem.
When the PDFViewer C# script calls a Native function the whole script blocks without any error message.
This is the code that calls the native function NativeMethods.FPDF_InitLibrary();
public void EnsureNativeLibraryIsInitialized(){
lock (PDFLibrary.nativeLock){
if (!m_IsLibraryInitialized){
NativeMethods.FPDF_InitLibrary();
m_IsLibraryInitialized = true;
}
}
}
and this is how the native function is defined
...
[MethodImpl(MethodImplOptions.Synchronized), DllImport(PDFLibrary.PLUGIN_ASSEMBLY)]
public static extern void FPDF_InitLibrary();
...
Searching online I've found this guide that tells to Build Native Plugins to make the third-party libraries to work. But the guide refers to clicking on Magic Leap > Build Native Plugin which is not present in my Unity version. These are the only options available on my PC:
The PDFViewer asset has a folder inside called Plugins where there are some compiled files, does this have anything to do with the problem? This is the folder structure:
Unity Editor version: 2022.2.20f1
ML2 OS version : Version 1.4.0-dev2 - Build B3E.230907.10-R.033 - Android API Level 29
MLSDK version: 1.11.0
Host OS: Windows 11