We imported it via nuget for unity now. Still not working:
16:55:11.814UTC: GameInitialization:LicenseManager - Exception: System.DllNotFoundException: LexActivator
at (wrapper managed-to-native) Cryptlex.LexActivatorNative.SetProductFile(string)
at Cryptlex.LexActivator.SetProductFile (System.String filePath) [0x0000f] in <71174367958147759f59003818bb2d35>:0
at Cryptlex.CryptlexService.SetProductFile (System.String filePath) [0x00001] in
We were creating a whole new clean Unity project now, added NuGet for Unity and imported Cryptlex. We are running 2019.4.12f on build platform Android.
We are now trying to use the aar. This seems to work partly. No DllNotFoundException anymore. Setting the product data works, but setting the product id gives us following error:
Insufficient system permissions.
LexActivator.SetProductData(“PASTE_CONTENT_OF_PRODUCT.DAT_FILE”); => WORKS
LexActivator.SetProductId(“PASTE_PRODUCT_ID”, LexActivator.PermissionFlags.LA_IN_MEMORY); => DOES NOT WORK
We are currently working on an android vr headset from htc. Also using LA_IN_MEMORY does yield the same error. Any ideas?
We dropped the AAR package into Plugins/runtimes/arm64-v8a/lexactivator-3.19.1.aar and specified the platform Android only.
Does not work for the editor, does work for the Android device.
SetProductId with LA_USER does return “Insufficient system permissions.” and the app crashes.
SetProductId with LA_IN_MEMORY does return “Can’t find an fitting activation.” and app crashes
Is there any way we could make this work? This is really important for us, as we are planning a major release on a standalone VR device (vive focus 3).
While this will not cause any problems, it will be difficult for us to provide support for a custom client.
I would suggest you try to use LexActivator.SetCustomDeviceFingerprint() with multiple strings before activating the license and let me know if it works.
Used a 64 byte long hash calculated by the devices name as fingerprint. Still returns “Can’t find an fitting activation” and “Failure!” as soon as SetProductId is called in LA_IN_MEMORY mode. After that the application starts to crash. So it does unfortunately not work.
I’m sorry to hear that solution did not work for you. I did some digging and found that the Unity documentation suggests using the CallStatic() method to call Java or Kotlin static methods from C# scripts.
The method is part of their Java interop. It might be useful to use this till we can confirm a dedicated solution for your use case.
So, we got it at least not crashing our app anymore. We are also able to activate a license. Unfortunately IsLicenseGenuine & IsLicenseValid always returns LA_FAIL. Except before activation. This is really weird behavior. Do you know anything about this?
09-13 12:42:49.379 W 16:42:49.378UTC: Failed to get product key: The product id is incorrect.
09-13 12:42:49.379 W 16:42:49.379UTC: Cannot load license information to display in UI: product key not found
09-13 12:42:53.158 I 16:42:53.157UTC: GameInitialization:LicenseManager - Checking License for Version 3
09-13 12:42:53.161 I 16:42:53.160UTC: GameInitialization:LicenseManager - Setting GUID to GUID CUT v3
09-13 12:42:53.164 W 16:42:53.163UTC: GameInitialization:LicenseManager - Activation unsuccessful.
09-13 12:42:53.164 I 16:42:53.164UTC: GameInitialization:LicenseManager - Failure!
09-13 12:42:53.164 I ReturnCode: 1
09-13 12:44:40.160 I 16:44:40.159UTC: GameInitialization:LicenseManager - Setting GUID to GUID CUT v3
09-13 12:44:40.161 I 16:44:40.161UTC: GameInitialization:LicenseManager - Setting Product Key to: KEY CUT
09-13 12:44:40.163 I 16:44:40.162UTC: GameInitialization:LicenseManager - Setting Activation Meta Data, Device Name: DEVICE NAME CUT
09-13 12:44:40.164 I 16:44:40.164UTC: GameInitialization:LicenseManager - Trying to activate the product
09-13 12:44:40.964 I 16:44:40.963UTC: GameInitialization:LicenseManager - Success!
09-13 12:44:40.964 I ReturnCode: 0
09-13 12:44:40.965 I 16:44:40.965UTC: Email MAIL CUT : fieldData CUT
09-13 12:44:40.966 I 16:44:40.965UTC: GameInitialization:LicenseManager - The Email address matches the registrated Email address
09-13 12:44:40.966 I 16:44:40.966UTC: GameInitialization:LicenseManager - Activation Successful
09-13 12:46:46.831 W 16:46:46.830UTC: Failed to get product key: The product id is incorrect.
09-13 12:46:46.831 W 16:46:46.831UTC: Cannot load license information to display in UI: product key not found
09-13 12:46:50.649 I 16:46:50.649UTC: GameInitialization:LicenseManager - Checking License for Version 3
09-13 12:46:50.653 I 16:46:50.653UTC: GameInitialization:LicenseManager - Setting GUID to GUID CUT v3
09-13 12:46:50.656 W 16:46:50.656UTC: GameInitialization:LicenseManager - Activation unsuccessful.
09-13 12:46:58.927 I 16:46:58.926UTC: GameInitialization:LicenseManager - Setting GUID to GUID CUT v3
09-13 12:46:58.929 I 16:46:58.927UTC: GameInitialization:LicenseManager - Setting Product Key to:
09-13 12:46:58.932 E 16:46:58.931UTC: Invalid license key.