⚠️ Display simple alert and confirm dialogs on both iOS and Android.
https://docs.unity3d.com/Packages/[email protected]/manual/index.html
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "https://github.com/CandyCoded/alertconfirmdialog.git#v1.0.1",
...
}
}
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "1.0.1",
...
},
"scopedRegistries": [
{
"name": "candycoded",
"url": "https://registry.npmjs.com",
"scopes": ["xyz.candycoded"]
}
]
}
First include the package.
using CandyCoded.AlertConfirmDialog;
AlertConfirmDialog.Alert("Title", "Message");
AlertConfirmDialog.Alert("Title", "Message", () =>
{
Debug.Log("Ok");
});
AlertConfirmDialog.Confirm("Title", "Message");
AlertConfirmDialog.Confirm("Title", "Message", () =>
{
Debug.Log("Ok");
});
AlertConfirmDialog.Confirm("Title", "Message", () =>
{
Debug.Log("Ok");
}, () =>
{
Debug.Log("Cancel");
});