LimeLM and Unity 3D

Hi,

It would be possible to use LimeLM with a game created with Unity 3D (www.unity3d.com)?

Our game will run on Windows and MAC OS.

Thanks.

Hi Pedro,

Yes, you can use TurboActivate (the part of LimeLM you include with your app) on Mac, Linux, and Windows. Also, since unity uses C# to work with external libraries you can use our pre-written C# bindings (the TurboActivate.cs file in the API download). It's in the "API\CSharp" folder.

Here's an article on using TurboActivate with C#.

pedrojr wrote:> Hi,> > It would be possible to use LimeLM with a game created with Unity 3D> (www.unity3d.com)?> > Our game will run on Windows and MAC OS.> > > Thanks.

Hi Pedro - I am also trying to include TA with a Unity project, and I was wondering if you were able to get this working?

We have a number of customers using TurboActivate in their Unity apps. What exact problem are you having?

We're developing on a Mac, building both PC and Mac exports of our app.I've created a project, downloaded the .dat file, and am using the CSharp example you've provided. Of course, that example is for PC, not Mac. So I edited the TurboActivate.cs file to point to the .dylib file instead of the .dll file. That seemed to work to get rid of the DLLNotFoundException I had been getting. But now I'm getting an error that it can't find the .dat file, which is in the same location. I'm trying to run the app in the Unity Editor (not an exported build), so there is no executable file yet.

When you create the TurboActivate() object, the second parameter can be the full path to the TurboActivate.dat file. Or you can store the TurboActivate.dat file in memory and pass it to the second constructor which takes a byte[].

Your choice.

I tried that too. The error says the file is either missing or corrupted. Is it possible it's the latter? I've downloaded it several times. Can you access my dashboard to see that the project is set up correctly?

You need to pass in the correct Version GUID too. Also, on macOS, the API is a bit different. It's PAnsi strings and not PUnicode strings. So, you'll need to modify the PInvoke calls for macOS.

Thanks - changing the encoding to PAnsi worked

Wyatt,

I've got a new error:Failed to start the trial: Insufficient system permission. Either start your process as an admin / elevated user or call the function again with the TA_USER flag.

I'm not sure why this would happen, as I am on an admin user account.

If you use TA_SYSTEM then you need to either run "elevated" or as "sudo". Being an admin account is not enough.

Also, you only need that elevated / sudo permission the first time you call CheckAndSavePKey() or UseTrial() with TA_SYSTEM. Subsequent calls do not require elevated / sudo permission.

That's going to be difficult for players who aren't tech-savvy. Is there any way to make sure the game always runs with it? Or is it perhaps possible to prevent it from needing the TA_System? Unity is able to persist data without such requirements, perhaps it's possible to save the product key with C#?

Just use TA_USER instead of TA_SYSTEM.