- Home /
Can I limit the number of times a feature in Unity Plugin can run?
It is about a Unity Plugin I am developing.
I am thinking of this scenario:
set a limitation to the number of times a feature in the Unity Plugin can run;
once the pre-set limitation is reached, the user will not be able to use the feature in question, but can still use all other features in the Unity Plugin;
to get the feature in question afterwards, the user will have to go online and make a payment.
Does anyone know if Unity will allow this scenario?
Thank you.
Answer by tanoshimi · Oct 15, 2016 at 08:36 AM
Well, it's technically possible but I haven't heard of it done before, and I wouldn't recommend it. How were you thinking about recording the number of uses? Anything stored client-side - in the registry or some local data file - would be pretty easy to break. And anything stored server-side would require an active internet connection every time the plugin was used, and might put some purchasers off (personally, I wouldn't want a third-party asset that pinged back unknown information from my Unity project to a server I had no idea who controlled).
TBH, I would recommend taking the route most asset developers follow, which is either to release a "lite" version that has some features disabled, or else simply produce a really good web demo or tutorial video that demonstrates the functionality of the plugin rather than anything time/use- limited.
I assumed the counter cause from what @ThmYgx described sounds like a cellphone app which is rarely broken. but even if not there are some ways to hide it anyway.
Anyway what you say is right and totally the best choice.
I think we have interpreted the question differently - I'm assu$$anonymous$$g @ThmYgx meant that the plugin was intended to run in the Unity Editor - some kind of editor extension, for example. Therefore the target platform itself is irrelevant - it's the developer who is limited by the number of feature uses, not the end users. But having re-read the question, I can see that maybe your interpretation is right too. Perhaps we need a bit more info from the OP....
Hi Tanoshimi,
Thank you for your replies.
Yes, I meant that the plugin would be a Unity Editor extension. Its users will be 3D professionals like ourselves, not the end-users.
Are your recommendation still valid?
Thank you
Answer by pcdrive · Oct 15, 2016 at 08:32 AM
Hi @ThmYgx,
I dont really understand how plugins work, but i think you can do it with a couunter maybe. For example you make a counter integer variable and give it a 3 value. and every use of the feature you decrease it, and when its 0 the user cannot use it anymore. You can save the vaqriable so it will not be 3 again when you restart the game. The only problem with this is to protect it. so you should save it in a safe way.
thats the only think i can think of related to your question,
Good luck finding the solution =)
Your answer
Follow this Question
Related Questions
What can we do to learn : Create Payment in MyGame 1 Answer
Writing custom editors 0 Answers
Unibill in-app purchase plugin, any experience? 3 Answers
Stream bytes from unmanaged C++ to Unity ? 1 Answer
YouTube Player Fragment in Plugin 1 Answer