DebugCategoryRegistrar Class Reference

This class provides functionality to easily register categories for use by CatDebug.
It also provides functions that allow getting/setting the enabled state or name of a particular category, and automatically stores these values to disk using Unity's PlayerPrefs.
If registered previously, these categories, and their states, are loaded from storage for initialization.

Static Public Member Functions

static void DeleteAllSavedCategoryKeysFromPlayerPrefs ()
 Be removing all registered categories, this function will make previously registered category id's available (on a first come, first serve basis)
 
static System.Collections.Generic.List< string > GetAllRegisteredCategoryNames ()
 Creates and returns a new list containing all the Registered category names.
 
static void GetAllRegisteredCategoryNames (ref System.Collections.Generic.List< string > outputList)
 Generates a list of all the Registered category names, and puts them into the string List reference provided
 
static int GetCategoryID (string catName)
 Finds the registered integer index of the specified category. if not registered, returns -1;
 
static bool GetCategoryLogToFileOnDiabledState (int catID)
 Finds the enabled/disabled state of the specified category. if not registered, returns false.
 
static string GetCategoryName (int catID)
 Finds the name of the specified category. if not registered, returns empty string.
 
static bool GetCategoryState (int catID)
 Returns the enabled/disabled state of the specified category. if not registered, returns false.
 
static DebugCategorySettingsPlayerPref GetCategoryStateOption (int catID)
 Finds the PlayerPrefOption that stores the state of the specified category. if not registered, returns null.
 
static int RegisterCategory (string catName)
 Function takes a name and returns an id. if the name has been registered previously, it will get the same number, otherwise it will get an available id. if no id's remain, this function will return -1 The caller should retain this value, and reference the category with it, when using CatDebug.Log commands.
 
static void SetCategoryLogToFileOnDisabledState (int catID, bool state)
 Sets and saves the enabled/disabled state of the specified category.
 
static void SetCategoryState (int catID, bool state)
 Sets and saves the enabled/disabled state of the specified category.
 
static void UnRegisterCategory (string catName)
 Removes the specified category from storage. It's index may be reassigned after this.
 

Properties

static IEnumerable< int > registeredIDs [get]
 returns an enumeration of all the currently registered category ID numbers