AnsweredAssumed Answered

Unity 3D and dll library

Question asked by Max Desplanches on Dec 15, 2018
Latest reply on Feb 13, 2019 by Max Desplanches

Hello there,

 

I just got Trimble Catalyst device, works well with apps on the store.

 

I am trying to use SDK on Unity 3D, dll library from Xamarin doesn't seems to work, so I used ikvm to convert jar to dll to be recognized on sdk method.

 

Do you have any experience or feedback for unity 3D ? I am on 2018.1 version.

 

Here is the error (not very aqccurate) produce by code bellow.

 

Thanks you in advance,

 

Error: An exception was thrown by the type initializer for trimble.jssi.android.catalystfacade.CatalystFacade

 

code:


        AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
        AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
        AndroidJavaObject context = activity.Call<AndroidJavaObject>("getApplicationContext");
        Debug.Log("start Call");
        try
        {
            _facade = new CatalystFacade(AppGuid, context);
        }
        catch (Exception e)
        {
            Debug.Log(e.Message);
        }

Outcomes