This class contains extension functions used to draw some specific types of PrefOptions. It provides automatic load/save, as needed, and uses the appropriate function in the EditorGUILayout class to draw the fields. Not all preference data-types are supported in this class. However, the user can always create additional extension functions, following the same pattern, to handle and draw whatever type they wish. Currently supports int,float,string,Color, Vector3, Vector2 data types.
Static Public Member Functions | |
static void | DrawPrefControl (this IAccessPreferences< bool > prefOption) |
static void | DrawPrefControl (this IAccessPreferences< Color > prefOption) |
static void | DrawPrefControl (this IAccessPreferences< float > prefOption) |
static void | DrawPrefControl (this IAccessPreferences< int > prefOption) |
This extension function is convenient to load and save the value as necessary, and display it in the Editor using EditorGUILayout. | |
static void | DrawPrefControl (this IAccessPreferences< string > prefOption) |
static void | DrawPrefControl (this IAccessPreferences< Vector2 > prefOption) |
static void | DrawPrefControl (this IAccessPreferences< Vector3 > prefOption) |