Usage
Once you are done enabling the feature in Essential Kit Settings, you can access the feature classes once you import the required namespace.
1
using VoxelBusters.EssentialKit;
Copied!

Alert Dialog

A dialog is a small window that prompts the user to make a decision. A dialog does not fill the screen and is normally used for modal events that require users to take an action before they can proceed.
You can have the following for an Alert Dialog
    Title
    Message
    Add buttons
1
AlertDialog dialog = AlertDialog.CreateInstance();
2
dialog.Title = "Title";
3
dialog.Message = "Message";
4
dialog.AddButton("Yes", () => {
5
Debug.Log("Yes button clicked");
6
});
7
dialog.AddCancelButton("No", () => {
8
Debug.Log("Cancel button clicked");
9
});
10
dialog.Show(); //Show the dialog
Copied!

Date Picker

Date picker will be useful for capturing the time as an input from the user. This can be operated in three modes.
    Date : For allowing to pick Date alone (Day, Month, Year)
    Time : For allowing to pick time alone (Hours, Minutes)
    Date and Time : For allowing to pick both date and time
1
DatePicker datePicker = DatePicker.CreateInstance(DatePickerMode.Date);
2
datePicker.SetOnCloseCallback((result) => {
3
Debug.Log("Dismissed the picker with selected date : " + result.SelectedDate);
4
});
5
datePicker.Show();
Copied!
Last modified 2mo ago
Copy link