Assets/Scripts/Management/Serialization/SaveManager.cs
/// <summary>
/// Checks if the save file exists.
/// If not, creates it.
/// </summary>
Checks if the save file exists.
If not, creates it.
Checks if the save file exists . If not creates it .
public static void DoCheckFileAndCreate()
        {
            if (!File.Exists(savepath))
            {
                FileStream fileStream = File.Create(savepath);
                BinaryFormatter binaryFormatter = new BinaryFormatter();
                SaveBlobV2 blob = new SaveBlobV2();
                blob.InitEmpty();
                binaryFormatter.Serialize(fileStream, blob);
                fileStream.Close();
            }
        }
public static void DoCheckFileAndCreate ( ) { if ( ! File . Exists ( savepath ) ) { FileStream fileStream = File . Create ( savepath ) ; BinaryFormatter binaryFormatter = new BinaryFormatter ( ) ; SaveBlobV2 blob = new SaveBlobV2 ( ) ; blob . InitEmpty ( ) ; binaryFormatter . Serialize ( fileStream , blob ) ; fileStream . Close ( ) ; } }
Checks if the save file exists.
Checks if the save file exists .