EditorStats

Main class of Editor Statistics.

Properties

GUID that's the project's unique identifier.

public static string ProjectKey { get; private set; }

List of IRecord(s) used.

public static List<IRecord> Records { get; set; }

Methods

Stores a value temporarily behind the given key. The value is lost when Editor quits.

public static void Set(string key, object value)

Returns a value stored temporarily behind the given key. If no value is set or the value is invalid, returns the given default value.

public static T Get<T>(string key, T defaultValue)

Replaces a value for the given key with the return value of the given callback.

public static T Replace<T>(string key, T defaultValue, ReplaceDelegate<T> callback)

Modifies a value for the given key by invoking the given callback and setting the same value back.

public static T Modify<T>(string key, T defaultValue, ModifyDelegate<T> callback)

Moves a value from persistent storage to temporary storage (EditorPrefs to SessionState).

public static void Load(string key)

Moves a value from temporary storage to persistent storage (SessionState to EditorPrefs).

public static void Save(string key)

Returns the name of the given record based on its type.

public static string GetName<T>() where T : IRecord

Returns the name of the given record based on its type.

public static string GetName(IRecord record)

Returns the key of the given record based on its type.

public static string GetKey<T>() where T : IRecord

Returns the key of the given record based on its type.

public static string GetKey(IRecord record)

Saves all serialized records to persistent storage.

public static void SaveAll()

Loads all serialized records to temporary storage.

public static void LoadAll()

Opens a window used to export all records to a JSON file.

public static void Export()

Opens a window used to import records from a JSON file.

public static void Import()

Sets all records to null.

public static void Clear()

Last updated