Non MonoBehaviour implementation of Purchases.cs
It'd be really great and more useful if the Purchases.cs class wasn't a MonoBehaviour.
I can understand the ease of use for most unity devs to want it, but it more than likely be a scriptable object with the settings, and the rest of the classes be plain old c# objects (POCO).
Atm I have to instantiate this prefab/MonoBehaviour object into the scene in order to use the API, but most of my application logic is outside of the scene objects. (scene objects are only for UI/User interactions). I am programmatically setting up the Purchases object, so no MonoBehaviour should be required.
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Related to PR #482
Hi @StephenHodgson,
After chatting with the team, we think this would indeed be a better way to provide the API for Purchases. Unfortunately we won't have the bandwidth to tackle this right now but we have taken note and added it to our backlog. Thank you very much for your feedback!
Do let us know if you have any more ideas, we are always happy to receive feedback!
Thanks @tonidero
I would very much like to do this work for you. I actually already submitted an application on your careers page. It wouldn't take me very long to do and have lots of experience doing this sort of thing.
It'd be really great and more useful if the Purchases.cs class wasn't a MonoBehaviour.
This would be awesome but it won't be straightforward.
This library uses native plugins under the hood and there are two ways to communicate between unity <-> native code
UnitySendMessage requires MonoBehavior and it's easy & safe. You don't need to deal with type checking, making sure everything is on main thread etc. Would expect no serious crashes.
Delegates, however, requires objects to be set up, and make sure you move your logic to main thread (because unity runs on main thread) and any failures would lead to hard crashes.
I'm aware but I'm up to the challenge.
I've written multiple plugins with native interop.