PreviewPrefs Class Reference

This class stored options that re used when generating Preview Preferences. It also provides a GUI drawing function to display these options in the Preferences Window.

Public Types

enum  ShowAxisOptions { DoNotShow, ShowOrigin, ShowAxis }
 Three options to define ways to draw, or not draw the axis in the preview.
 

Static Public Member Functions

static void DeleteAllSavedPreviewPrefs ()
 Deletes all the preferences stored for PreviewEditor module.
 
static void PreferencesGUI ()
 Function that displays the preference options for the PreviewEditor module
 
static Quaternion startingXYAxisQuaternion ()
 generates a Quaternions based upon the preference startingXYAxisRotation's X and Y values
 

Static Public Attributes

static EditorPrefOption< Color > axisColor
 Color used to draw the axis in previews
 
static EditorPrefOption< ShowAxisOptionsaxisOption
 Option that defines if the axis should be drawn in previews, or just the origin should be drawn, or neither.
 
static EditorPrefOption< Color > backgroundColor
 Color of the field behind the preview object, in the preview window.
 
static EditorPrefOption< bool > debugHideDiaramaObjects
 By default, preview objects and cameras will be hidden from the scene hierarchy view. Toggle this option off to make them visible.
 
static EditorPrefOption< bool > focusOnBoundCenterNotOrigin
 This option defines weather the preview camera should be pointing at the axis origin, or the center of the objects bounds. These are only different when the preview object is not located at the origin.
 
static bool haveBeenChanged
 This flag is monitors to detect a change in the preferences, which will force any Previews to be redrawn.
 
static EditorPrefOption< Color > iconBackgroundColor
 Color of the field behind the preview object when drawing icons.
 
static EditorPrefOption< float > previewAmbientLight
 This float specifies how bright the unlit portions of the object should be.
 
static EditorPrefOption< int > previewAntiAliasingLevel
 the level of anti-aliasing that will be used when drawing previews.
 
static EditorPrefOption< Color > previewColor
 Color that Preview objects will be drawn with.
 
static EditorPrefOption< Vector3previewLightDirection
 This Vector3 specified the direction the light will shine on preview objects.
 
static EditorPrefOption< string > previewShaderName
 Name of the shader to be used when drawing previews.
 
static EditorPrefOption< bool > resetRotationOnSelectionChange
 Determines if the current rotation will be used, or if rotation should be returned to the default value, when a different object is selected.
 
static EditorPrefOption< bool > satuarateRGBforXYZaxis
 When true, will saturate the R, G, or B channel for each X,Y and Z axis, respectively.
 
static EditorPrefOption< bool > showAxisAtBoundsCenter
 When the bounds of the drawn object is not centered on the origin, this option will, when true, force the axis to be drawn at the center of the bounds instead.
 
static EditorPrefOption< bool > showPreviewsForProjectIcons
 Boolean option that defines if the EditorWithPreview should be used to generate icons in the Project view, or not.
 
static EditorPrefOption< Vector2 > startingXYAxisRotation
 The initial rotation of the preview object, relative to the preview camera.
 
+ Collaboration diagram for PreviewPrefs: