You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Feel/MMTools/Tools/MMSaveLoad/IMMPersistent.cs

33 lines
874 B
C#

2 months ago
namespace MoreMountains.Tools
{
/// <summary>
/// An interface classes that want to be saved by the MMPersistencyManager need to implement
/// </summary>
public interface IMMPersistent
{
/// <summary>
/// Needs to return a unique Guid used to identify this object
/// </summary>
/// <returns></returns>
string GetGuid();
/// <summary>
/// Returns a savable string containing the object's data
/// </summary>
/// <returns></returns>
string OnSave();
/// <summary>
/// Loads the object's data from the passed string and applies it to its properties
/// </summary>
/// <param name="data"></param>
void OnLoad(string data);
/// <summary>
/// Whether or not this object should be saved
/// </summary>
/// <returns></returns>
bool ShouldBeSaved();
}
}