Hello, after installing the IAP I started getting errors and breaking my project completely. I install the IAP write my code and got it all working. But after closing and opening the project. I found that sometimes IAP namespaces are missing, reimporting sometimes solves the issue but usually, I have to reopen the unity editor every time I face errors. Other third-party and my namespace are also not loading when reimporting the IAP.
Basically I get this error first whenever I select a button with the IAPButton component added.
TypeLoadException: Could not find method due to a type load error
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Not the same case but a similar one is also on the issue tracker here: Unity Issue Tracker - [IAP] "TypeLoadException" occurs while using "UnityEngine.Purchasing"
I get these errors when starting the editor.
Error: Could not load signature of UnityEngine.Purchasing.FakeUDPExtension:GetUserInfo due to: Could not load file or assembly 'UDP, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UDP, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none>
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoAttributeHelpers.cpp Line: 372)
Unloading broken assembly Assets/Plugins/UnityPurchasing/Bin/Stores.dll, this assembly can cause crashes in the runtime
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoManager.cpp Line: 1231)
When I reimport the package at first I get these errors.
Assembly 'Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll' will not be loaded due to errors:
Reference has errors 'Stores'.
Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:
Reference has errors 'Assembly-CSharp-firstpass'.
Assembly 'Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll' will not be loaded due to errors:
Reference has errors 'Assembly-CSharp-firstpass'.
Assembly 'Library/ScriptAssemblies/Assembly-CSharp-Editor.dll' will not be loaded due to errors:
Reference has errors 'Assembly-CSharp'.
Symbol file LoadedFromMemory doesn't match image C:\Users\ugurt\Documents\UnityProjects\ProjectPachinko\Library\PackageCache\com.unity.ext.nunit@1.0.0\net35\unity-custom\nunit.framework.dll
Assembly 'Assets/Plugins/UnityPurchasing/Bin/Stores.dll' will not be loaded due to errors:
Unable to resolve reference 'UDP'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Assembly 'Assets/Plugins/UnityPurchasing/Bin/Editor.dll' will not be loaded due to errors:
Unable to resolve reference 'UDP'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
This issue is happening on Windows and Mac
Thank you for your help