Skip to content

saparkhid/unity-toaster

Repository files navigation

unity-toaster

In an android game/application a toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. Toasts automatically disappear after a timeout. By this plugin you can bring android's toast feature into your unity3D android app/game.

USAGE:

see the example project: /unity-test/

You should copy the output/toast.aar into /Assets/Plugins/Android/ Then you should copy output/CafebitToaster.dll into /Assets/Plugins/

you can use the library like this:

C# Code:

public void Toast(string message){
 Cafebit.AndroidToast.Instance.Toast(message);
 //toast with textsize=25
 Cafebit.AndroidToast.Instance.ToastLong(message,Cafebit.AndroidToast.ToastGravity.Default,25.0f);
 //display toast center of screen
 Cafebit.AndroidToast.Instance.ToastLong(message,Cafebit.AndroidToast.ToastGravity.Center,);
}

Regards Seyed Ahmad Parkhid #Seyed_Ahmad_Parkhid

About

simple toast library for unity3d , useful for android applications and games built upon unity3d

Resources

Stars

Watchers

Forks

Packages

No packages published