1.0.1 • Published 4 years ago
xyz.candycoded.alertconfirmdialog v1.0.1
AlertConfirmDialog
⚠️ Display simple alert and confirm dialogs on both iOS and Android.
Installation
Unity Package Manager
https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.0/manual/index.html
Git
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "https://github.com/CandyCoded/alertconfirmdialog.git#v1.0.0",
...
}
}
Scoped UPM Registry
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "1.0.0",
...
},
"scopedRegistries": [
{
"name": "candycoded",
"url": "https://registry.npmjs.com",
"scopes": ["xyz.candycoded"]
}
]
}
Usage
First include the package.
using CandyCoded.AlertConfirmDialog;
Alert
AlertConfirmDialog.Alert("Title", "Message");
AlertConfirmDialog.Alert("Title", "Message", () =>
{
Debug.Log("Ok");
});
Confirm
AlertConfirmDialog.Confirm("Title", "Message");
AlertConfirmDialog.Confirm("Title", "Message", () =>
{
Debug.Log("Ok");
});
AlertConfirmDialog.Confirm("Title", "Message", () =>
{
Debug.Log("Ok");
}, () =>
{
Debug.Log("Cancel");
});