How to add a alert popup in your android, iOS, Windows phone game using Unity 5.3 ?


Alert popups are an essential part of every android app or game.

It helps developers to provide appropriate instructions and alerts to users while using the apps. We can implement alert popups on unity using many methods.

We are going to generate a popup alert using the easiest and efficient way possible by taking advantage of a plugin called “Mobile native popups”.

It is a free package that can be downloaded from unity asset store

This plugin will allow you to include native platform popups and preloaders in your game or application. supported mobile platforms. You also can use Playmaker Actions as alternative to coding

Link – https://www.assetstore.unity3d.com/en/#!/content/18479

Advantages of  Mobile native popups

  1. Super easy to implement
  2. API is cross-platform, so you need to implement it only once, and it will work on all
  3. Supports Android,iOS,Windows phone

It supports 4 types of popups

* Rate App
* Dialog
* Message
* Preloader

How to implement it on your project

Step 1

Download and import ‘Mobile native popups’ into your project from unity asset store


Step 2

After importing to your project you get a notification on the inspector window and complete the installation procedure (if don’t go to Assets\Plugins\StansAssets\Support\Settings\Resources\MNPSettings and complete the procedure)

Step 3

Create new C# script or use an existing script and open it visual studio


Step 4

public void alert()

   MobileNativeMessage msg = new MobileNativeMessage("your message");

Step 5

Attach this to the on Click() event of a button and you are good to go