MW UNITY NAMESPACE








































public static class

MSaveUtility


Utility to convert generics to their byte data and vice-versa.



public static byte[]

ToBytesT (T Object)

Summary:

Converts T Object to byte data.

Remarks:

Assumes T is marked with [System.Serializable.

Params:

Object:

        The Object to get byte data.

Returns:

The bytes representing Object.



public static T

ToObjectT (Byte[] Bytes)

Summary:

Converts byte data as T.

Params:

Bytes:

        The byte data of T.

Returns:

The bytes as a T Object.


public static class

MSaveSystem


A generic game saving sub-system.



public static void

Save (string FullDestinationPath, Byte[] Bytes)

Summary:

Creates or overwrites a file to FullDestinationPath and writes all Bytes.

Params:

FullDestinationPath:

        The name and directory of the file to write to.

Bytes:

        The bytes to write to the file.



public static void

SaveT (string FullDestinationPath, T ObjectToSave)

Summary:

Creates or overwrites a file to FullDestinationPath and writes all byte data from ObjectToSave.

Remarks:

Assumes T is marked with [System.Serializable].

Params:

FullDestinationPath:

        The name and directory of the file to write to.

ObjectToSave:

        The bytes of the Object to write to the file.



public static T

LoadT (string FullOriginPath)

Summary:

Loads data from an existing file as T.

Returns:

The saved data as T.



public static void

Delete (string FullPath)

Summary:

Deletes a save file.

Remarks:

WARNING: THIS WILL REMOVE ANY SPECIFIED FILE AND IS NOT LIMITED TO GAME SAVE FILES.

Params:

FullPath:

        The name and directory of the file to delete.