Window phone rate & review button

Hi folks, can you tell me how to make a “Rate & Review” button in Unity for Window Phone ? I’ve found this code:

MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); 
marketplaceReviewTask.Show();

but it need to use Microsoft.Phone.Tasks. But in Mono Develop I cannot “using” them. How can I do it ?

Make use of EventHandler to call ‘Review Task’ from Unity. You can do this by following below steps(visit Unity Expert for detailed explanation).

In Unity Game Engine-

Create Event -

using UnityEngine;
using System;
 
public static class events
{
        //Create a new event
        public static event EventHandler RateUs;
 
        public static void FireRateUs()
        {
                Debug.Log ("Opening Rate Task......");
                //If event is subscribed than fire it
                if(RateUs!=null)
                        RateUs(null,null);
        } 
}

Fire Event -

using UnityEngine;
 
public class RateUs : MonoBehaviour 
{
        void OnMouseDown()
        {
                events.FireRateUs();
        }
}

In Visual Studio IDE

Subscribe Event -

public MainPage()
{
     .
     .
     .
     .
     events.RateUs += events_RateUs;
}

Call Function -

void events_RateUs(object sender, EventArgs e)
{
    MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); 
    marketplaceReviewTask.Show();
}

I’m also having trouble with this. Here are the options that I know so far

  1. (Easy) Create a button that will redirect the user to the store’s page. On WP it will also redirect them to the store app and they can review your app (or share it) by swiping once to the right. Not as clean as the native call but it works. However, you will need to publish the app before implementing the feature (snippet at the end).

  2. (Easy + 10$) Buy the Windows Phone SDK asset from the store (I’ll probably do it since I mostly work with WP. 1

  3. (Not so easy) Create your own plugin. I’m a Unity newbie so for me at least that’s a no-no

Code snippet for #1

// As easy as 1-2-3
void OnGUI(){
		if(GUI.Button(new Rect(0f,0f, 150, 50), "Rate and Review")){
			Application.OpenURL("InsertStoreURLAsStringHere");

		}
	}

Here is a free alternative with IAP - Unity Asset Store - The Best Assets for Game Making :wink: