-
Notifications
You must be signed in to change notification settings - Fork 52
Utility
UniverseLib has several general utility classes which live in the UniverseLib.Utility
namespace.
ParseUtility
is a powerful parsing API for taking user input and parsing it into some common classes you would want to parse.
The main methods you will use are:
-
CanParse(Type)
- returns true if ParseUtility is able to parse the provided type. -
TryParse(string, type, out object, out Exception)
- the only method you need to use to try to parse something.
SignatureHighlighter
is a Unity rich-text signature highlighter, able to syntax-highlight Types, Methods, Properties and Fields.
-
Parse(Type, bool, MemberInfo)
- the main method for parsing a Type, Namespace and optional MemberInfo. -
HighlightMethod(MethodInfo)
- a helper for highlighting a MethodInfo along with it's arguments and containing Type. -
ParseGenericArgs(Type[], bool)
- a helper to highlight an array of Types into a<T1, T2, ...>
format.
ToStringUtility
is mainly used by UnityExplorer for formatting an object's ToString value.
UnityHelpers
contains an assortment of general Unity helper methods.
MiscUtility
contains some miscellaneous helper methods, for things which didn't fit in an existing category.
IOUtility
contains a few IO-related helpers.
ArgumentUtility
is a small class for helping with some common argument operations (ie, Array.Empty
, etc).