Start a new topic

Unity Editor - Error initializing C# functions

Unity Version : Unity 2018.2.0f2


Hello,


I've recently tested the Wikitude plugin for Unity on a clean Project without problems. 

I've imported the package into my Unity Project and I now have the following issues when started from the Editor :

Error initializing C# functions! System.TypeInitializationException: The type initializer for 'Wikitude.BridgeFactory' threw an exception. ---> System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.

  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)

  at System.Reflection.Assembly.GetTypes () [0x00000] in <f826c2584fc94ec19a48a6576640bdc5>:0

  at Wikitude.BridgeFactory..cctor () [0x00023] in <e99434a9fc48492f8358885a1de1fb87>:0

   --- End of inner exception stack trace ---

  at Wikitude.WikitudeSDK.CreatePlatformBridge () [0x00013] in <4138946285fc4605ba8de867644446c1>:0

  at Wikitude.WikitudeSDK.get_PlatformBridge () [0x00007] in <4138946285fc4605ba8de867644446c1>:0

  at Wikitude.TrackerManager.Init () [0x00159] in <4138946285fc4605ba8de867644446c1>:0 

UnityEngine.Debug:LogError(Object)

Wikitude.TrackerManager:Init()

Wikitude.WikitudeBridge:Setup()

Wikitude.WikitudeCamera:Start()


ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.

System.Reflection.Assembly.GetTypes () (at <f826c2584fc94ec19a48a6576640bdc5>:0)

Wikitude.BridgeFactory..cctor () (at <e99434a9fc48492f8358885a1de1fb87>:0)

Rethrow as TypeInitializationException: The type initializer for 'Wikitude.BridgeFactory' threw an exception.

Wikitude.WikitudeSDK.CreatePlatformBridge () (at <4138946285fc4605ba8de867644446c1>:0)

Wikitude.WikitudeSDK.get_PlatformBridge () (at <4138946285fc4605ba8de867644446c1>:0)

Wikitude.WikitudeCamera.Start () (at <4138946285fc4605ba8de867644446c1>:0)


The webcam does not start and the screen remains black.

I have these errors in my own scenes, in the Wikitude sample scenes and in a scene only containing the WikitudeCamera prefab.


I also checked that the player settings from both projects are matching.


I guess I'm missing something here, do you have any idea where these issues can come from?


1 person has this problem

Hi, 


Do you have the same error as in the original post?

Does this happen in the editor, or on the device?
Which OS, Unity version and SDK version are you using?

Thank you,

Alexandru

Any Solution to this , I have all Dependencies and still doesn't work

Hi, 


It seems like there are some files missing from your project.

Please make sure that Wikitude/Dependencies folder contains the following files:

  • AndroidBridge.dll
  • iOSBridge.dll
  • link.xml
  • MacOSEditorBridge.dll
  • Platform.cs
  • UWPBridge.dll
  • WikitudeBridge.dll
  • WikitudeUnityPlugin.dll
  • WindowsEditorBridge.dll


Best regards,

Alexandru

Login or Signup to post a comment