- Home /
Adding rate button in my game?
Hello friends I want to add a button in my game, so that if user clicks on that button, he should rate my game and it should work on android and i-phone as well.
Answer by Dreamora · Mar 25, 2013 at 09:27 AM
One that works for both is not possible as they have distinct marketplaces.
But there are easy systems for both of them. For iOS I would recommend to look at appirater, a free opensource piece of code that can be found at https://github.com/arashpayan/appirater to do exactly this (its the code behind most of those 'please rate this' popups you might know :))
and will you please suggest me something for the android as well. I got 'rate me' at asset store but its paid :(
I don't have one at hand for Android I fear. Also please keep in $$anonymous$$d that above Appirater is objc code, not for Unity. To get this or other native code into Unity you either need to write an own plugin to use them or invest into a small plugin that does this for you already unless there is a free one. There are various plugins available that offer such rating capabilities straight within Unity, some including extra features beyond just that. This might mitigate the aspect of 'cost' probably depending on your application
Hey Ganesh, good question. This is how you do it, Create a Rate button however you like, using unity's native GUI or any other external plugins, and call this function on button click.
void OnRateButtonClick(){
#if UNITY_ANDROID
Application.OpenURL("market://details?id=YOUR_APP_ID");
#elif UNITY_IPHONE
Application.OpenURL("itms-apps://itunes.apple.com/app/idYOUR_APP_ID");
#endif
}
Note: Replace YOUR_APP_ID with, well your app id :) That should do.
I'll tell you what helped me with my game, I used this free plugin called polljoy(polljoy.com), for the rate game popUp, and handled the code OnRateButtonClick() upon user feedback. So I create a popup, when my users answer, they get rewarded and it gets them straight to the app store. Basically 20 $$anonymous$$s to integrate.
Hope it helped!!