Crash on application quit if License Callback has run (Unity game engine)


#1

I’m so close to having this all fully integrated with my Unity application. Everything works great except one thing. If I hook up the SetLicenceCallback and it runs in my application, then my application freezes when I attempt to close it. It’s as if it can’t shut down the process created by running that callback. It’s completely fine if I don’t hook up the callback or even if I quit the application before the server sync occurs. Do you have any idea why that might be happening? Or if there is a way I can manually unhook the callback during my application quit process.

I know you probably don’t officially support Unity as a platform to integrate with, however, everything is working great apart from this one thing. Any help with fixing it would be greatly appreciated.


#2

Hi Chaz,

Can you try setting license callback to null before exit. Also ensure you are using LexActivator v3.9.2

Regards,
Adnan


#3

Hi Adnan,

When I try setting the licence callback to null I get a null reference exception and I have checked to make sure that I am using LexActivator v3.9.2.

I’m thinking it may be something to do with how unity handles multi-threading, but not 100% sure. I am thinking as a work around I could create my own object that performs the IsLicenceGenuine check manually every sync period. Can you foresee any issues with doing it that way?

Kind regards,
Chaz


#4

Hi Chaz,

After calling IsLicenseGenuine () function, you can start a timer which invokes this function with the frequency of server sync interval. That will work too.

Regards,
Adnan


#5

Hi Adnan,

That’s great. That’s what I’ll do. Thank you very much for the help.

Kind regards,

Chaz