This utility provides the ability to turn logging on and off, by category. When displaying information, the appropriate category is specified, and the message will only be logged, if that category actually has logging enabled. DLL_SPECS Allows the programmer to specify a CategoryIndex (a int index), each time a Debug Log used is taken.
Each category may be enabled or disabled individually. Disabled categories, will NOT display Debug Log messages. Categories are registered with the DebugCategoryRegistrar class, and their enabled state is stored via Unity PlayerPrefs. This utility is internally used to draw various modules of options under a single EyEeengines section, in the Unity Editor Preferences window. Categorical Debug options are drawn in this window.
example:
Modules | |
EyEengines.CatDebug.UnityEditor.dll | |
ExtendedPrefs dll for use in the Unity Editor. | |
EyEengines.CatDebug.dll | |
ExtendedPrefs dll for use in built games, and the Unity Editor. | |
Classes | |
class | CatDebug |
This static class allows the programmer to specify a CategoryIndex, each time a Debug Log used is taken. Each category may be enabled or disabled individually. Disabled categories, will NOT display Debug Log messages. | |
class | CatDebugOptions |
This class initializes and stores PlayerPrefs, which are persistent between sessions, that define how CatDebug will function. | |
class | CategoricalDebugOptionsGUI |
This class provides a function that can be used to display the Various Debug Categories along with toggle controls to enable and disable each. These options are not automatically drawn, (unless the VendorPrefs library is implemented in the unity project), so you will need to setup your own callback attribute. | |
class | DebugCategoryRegistrar |
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. | |
class | DebugCategorySettings |
stores the state information regarding each category | |
class | DebugCategorySettingsPlayerPref |
Concrete Variant of the PlayerPrefOption template class used to store DebugCategorySettings objects. It overrides the Load, Save and SetToDefault functions of the base class, to save/load each member of the DebugCategorySettings object Every-time a new CatDebug category is registered, a new instance of this class is created, and if it doesn't already exist, is stored in PlayerPrefOptions. If the category IS found to exist in PlayerPrefOptions, it is assigned the categoryID in the stored in the found DebugCategorySettings. | |