|
void | AddTextInputField (TextInputFieldOptions options=null) |
| Adds a text input field to the alert.
|
|
void | AddButton (string title, Callback callback) |
| Adds an action button to the alert. Here, the default style is used.
|
|
void | AddButton (string title, Callback< string[]> callback) |
| Adds an action button to the alert. Here, the default style is used.
|
|
void | AddCancelButton (string title, Callback callback) |
| Adds action button to the alert. This style type indicates the action cancels the operation and leaves things unchanged.
|
|
void | Show () |
| Shows the alert dialog to the user.
|
|
void | Dismiss () |
| Dismisses the alert dialog before user selects an action.
|
|
The following code example shows how to configure and present an alert dialog.
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
public void Start()
{
newDialog.SetTitle(title);
newDialog.SetMessage(message);
newDialog.
AddButton(button, OnAlertButtonClicked);
}
private void OnAlertButtonClicked()
{
}
}
The AlertDialog class provides an interface to display an alert message to the user.
Definition AlertDialog.cs:46
void AddButton(string title, Callback callback)
Adds an action button to the alert. Here, the default style is used.
Definition AlertDialog.cs:186
static AlertDialog CreateInstance(AlertDialogStyle alertStyle=AlertDialogStyle.Default)
Creates a new instance of the AlertDialog class.
Definition AlertDialog.cs:113
void Show()
Shows the alert dialog to the user.
Definition AlertDialog.cs:217
Namespace for essential kit features. You need to import this namespace along with VoxelBusters....
Definition AddressBook.cs:8