Toastdocumentation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

USER GUIDE

TOAST DISPLAY
POPUP MESSAGE
IN UNITY

Larkal Studio
Toast Display Popup Message – LARKAL STUDIO

Table of Contents
I. INTRODUCTION .............................................. 3
II. PACKAGE SETUP ............................................ 3
III. HOW TO USE…………………………………4
IV. FUNCTION CUSTOMIZATION ................... 4
1. Function Argument ......................................................... 4
2. Default Function………………………………..5
3. Set Duration…………………………………….5
4. Set Position……………………………………..5
V. QUERIES………………………………………6

2
Toast Display Popup Message – LARKAL STUDIO

I. INTRODUCTION

Toast provide to display simple message in a small popup. It can also


be used to display information for the short period of time. Toasts
automatically disappear after timeout. You can easily customize the
timeout duration and set the position.

Features
- Toast simple popup message
- Very easy to use
- Very easy to customize
- Works with all platforms (Android, PC, MAC, Linux, iOS...)
- Full documentation included.
- Documented demo examples.
- Good support

II. PACKAGE SETUP


1. Import the package to a Unity Android project.

2. Run the demo scene( Assets >Scene>Main)

3
Toast Display Popup Message – LARKAL STUDIO

III. HOW TO USE


1. Create an empty GameObject and Drag the ToastController Script
on it from the Project pane (Assets>Toast>Assets >Script>
ToastController)

2. Drag and drop the UIToast prefab from the Project pane
(Assets>Toast>Assets > Prefab > UIToast) to the Hierarchy pane
(empty GameObject) in Unity.

3. Create Script and Assign namespace (using larkalStudio)

4. Call the functions on this object like following:


Toast.instance.ShowMessage(TestMessage );

IV. FUNCTION CUSTOMIZATION


1. Function Argument
public void ShowMessage(string msg, float Timeduration, float
SetPositionX, float SetPositionY)
In default ,
Timeduration=0.1f
SetPositionX=2.0f [Screen.width/2]
SetPositionY=2.0f [Screen.height/2]

4
Toast Display Popup Message – LARKAL STUDIO
2. Default Function
Toast.instance.ShowMessage( string message)

- To show a text in toast for default duration (0.1f) and


position(middle)

3. Set Duration
Toast.instance.ShowMessage(string message, float
timeduration)

- To show a text in toast for set duration

4. Set Position
Toast.instance.ShowMessage (string msg, float timeduration,
float SetPositionX, float SetPositionY )

- To show a text in toast for set duration and set position X


axis and Y axis based on canvas Screen.

5
Toast Display Popup Message – LARKAL STUDIO
QUERIES
Kindly contact me for further queries or information
or review, please email me at
studiolarkal@gmail.com.
THANK YOU AND GOOD LUCK WITH YOUR GAMES!

You might also like