[Tooltip("Shows a confirmation if this slot already exists when we select it.")]
publicboolshowConfirmationIfExists=true;
[Tooltip("Whether the Create new slot button should be visible.")]
publicboolshowCreateSlotButton=true;
[Tooltip("Whether we should automatically create an empty save file when the user creates a new save slot. This will be created using the default settings, so you should set this to false if you are using ES3Settings objects.")]
publicboolautoCreateSaveFile=false;
[Tooltip("Whether a save slot should be selected after a user creates it.")]
publicboolselectSlotAfterCreation=false;
[Space(16)]
[Tooltip("The name of a scene to load after the user chooses a slot.")]
publicstringloadSceneAfterSelectSlot;
[Space(16)]
[Tooltip("An event called after a slot is selected, but before the scene specified by loadSceneAfterSelectSlot is loaded.")]
publicUnityEventonAfterSelectSlot;
[Tooltip("An event called after a slot is created by a user, but hasn't been selected.")]
publicUnityEventonAfterCreateSlot;
[Space(16)]
[Tooltip("The subfolder we want to store our save files in. If this is a relative path, it will be relative to Application.persistentDataPath.")]
publicstringslotDirectory="slots/";
[Tooltip("The extension we want to use for our save files.")]
publicstringslotExtension=".es3";
[Space(16)]
[Tooltip("The template we'll instantiate to create our slots.")]
publicGameObjectslotTemplate;
[Tooltip("The dialog box for creating a new slot.")]
publicGameObjectcreateDialog;
[Tooltip("The dialog box for displaying an error to the user.")]
publicGameObjecterrorDialog;
// The relative path of the slot which has been selected, or null if none have been selected.
// Manages the context menu items for creating the slots.
publicclassES3SlotMenuItems:MonoBehaviour
{
[MenuItem("GameObject/Easy Save 3/Add Save Slots to Scene", false, 33)]
[MenuItem("Assets/Easy Save 3/Add Save Slots to Scene", false, 33)]
[MenuItem("Tools/Easy Save 3/Add Save Slots to Scene", false, 150)]
publicstaticvoidAddSaveSlotsToScene()
{
#if!ES3_TMPRO||!ES3_UGUI
EditorUtility.DisplayDialog("Cannot create save slots","The 'TextMeshPro' and 'Unity UI' packages must be installed in Window > Package Manager to use Easy Save's slot functionality.","Ok");
[MenuItem("GameObject/Easy Save 3/Add Load Slots to Scene", false, 33)]
[MenuItem("Assets/Easy Save 3/Add Load Slots to Scene", false, 33)]
[MenuItem("Tools/Easy Save 3/Add Load Slots to Scene", false, 150)]
publicstaticvoidAddLoadSlotsToScene()
{
#if!ES3_TMPRO||!ES3_UGUI
EditorUtility.DisplayDialog("Cannot create save slots","The 'TextMeshPro' and 'Unity UI' packages must be installed in Window > Package Manager to use Easy Save's slot functionality.","Ok");