public void CreateSaveFile(string filename, CharacterData.CharacterInfo charInfo) { CurrentSaveName = filename; CurrentSaveData = new SaveData { characterVisuals = new CharacterVisual(charInfo) }; if (!File.Exists(filePath)) { File.Create(filePath).Close(); } DataFormat format = DataFormat.Binary; var bytes = SerializationUtility.SerializeValue(CurrentSaveData, format); File.WriteAllBytes(filePath, bytes); }
public static void Create(string filename, CharacterData.CharacterInfo charInfo) { PlayerPrefs.SetInt(TutorialKey, 1); manager.CreateSaveFile(filename, charInfo); }
public static void Create(string filename, CharacterData.CharacterInfo charInfo) { manager.CreateSaveFile(filename, charInfo); }