public override void OnInspectorGUI() { DrawDefaultInspector(); Script_SaveGameControl control = (Script_SaveGameControl)target; if (GUILayout.Button("Save")) { control.Save(); } if (GUILayout.Button("Delete Game Data")) { Script_SaveGameControl.Delete(); } if (GUILayout.Button("ChangeSaveFileToSlot1")) { Script_SaveGameControl.saveSlotId = 1; } if (GUILayout.Button("Copy Slot 0 to 1")) { Script_SaveGameControl.Copy(0, 1); } }
public void CopyGame(int targetSlotId) { Debug.Log("Trying to Copy"); Script_SaveGameControl.saveSlotId = copiedSlotId; if (Script_SaveGameControl.Copy(copiedSlotId, targetSlotId)) { // update that slot savedGameController .GetSlotTransform(targetSlotId) .GetComponent <Script_SavedGameTitle>() .InitializeState(); } // end copy mode State = SavedGameState.Start; EnterSavedGamesSelectView(); }