https://github.com/candycoded/alertconfirmdialog
⚠️ Display simple alert and confirm dialogs on both iOS and Android.
https://github.com/candycoded/alertconfirmdialog
Last synced: about 1 year ago
JSON representation
⚠️ Display simple alert and confirm dialogs on both iOS and Android.
- Host: GitHub
- URL: https://github.com/candycoded/alertconfirmdialog
- Owner: CandyCoded
- License: mit
- Created: 2021-02-10T06:24:59.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-14T06:50:12.000Z (about 5 years ago)
- Last Synced: 2025-04-09T04:34:11.780Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AlertConfirmDialog
> ⚠️ Display simple alert and confirm dialogs on both iOS and Android.
[](https://www.npmjs.com/package/xyz.candycoded.alertconfirmdialog)
## Installation
### Unity Package Manager
#### Git
```json
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "https://github.com/CandyCoded/alertconfirmdialog.git#v1.0.1",
...
}
}
```
#### Scoped UPM Registry
```json
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "1.0.1",
...
},
"scopedRegistries": [
{
"name": "candycoded",
"url": "https://registry.npmjs.com",
"scopes": ["xyz.candycoded"]
}
]
}
```
# Usage
First include the package.
```csharp
using CandyCoded.AlertConfirmDialog;
```
### Alert
```csharp
AlertConfirmDialog.Alert("Title", "Message");
```
```csharp
AlertConfirmDialog.Alert("Title", "Message", () =>
{
Debug.Log("Ok");
});
```
### Confirm
```csharp
AlertConfirmDialog.Confirm("Title", "Message");
```
```csharp
AlertConfirmDialog.Confirm("Title", "Message", () =>
{
Debug.Log("Ok");
});
```
```csharp
AlertConfirmDialog.Confirm("Title", "Message", () =>
{
Debug.Log("Ok");
}, () =>
{
Debug.Log("Cancel");
});
```