C# Class UnityEditor.ObjectPreview

Inheritance: IPreviewable
Mostra file Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Protected Properties

Property Type Description
m_ReferenceTargetIndex int
m_Targets Object[]

Public Methods

Method Description
DrawPreview ( Rect previewArea ) : void

This is the first entry point for Preview Drawing.

GetInfoString ( ) : string

Implement this method to show object information on top of the object preview.

GetPreviewTitle ( ) : GUIContent

Override this method if you want to change the label of the Preview area.

HasPreviewGUI ( ) : bool

Can this component be Previewed in its current state?

Initialize ( Object targets ) : void

Called when the Preview gets created with the objects being previewed.

MoveNextTarget ( ) : bool

Called to iterate through the targets, this will be used when previewing more than one target.

OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void

Implement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector.

OnPreviewGUI ( Rect r, GUIStyle background ) : void

Implement to create your own custom preview for the preview area of the inspector, primary editor headers and the object selector.

OnPreviewSettings ( ) : void

Override this method if you want to show custom controls in the preview header.

ReloadPreviewInstances ( ) : void
ResetTarget ( ) : void

Called to Reset the target before iterating through them.

Private Methods

Method Description
AbsRatioDiff ( float x, float y ) : float
DrawPreview ( IPreviewable defaultPreview, Rect previewArea, Object targets ) : void
GetGridDivision ( Rect rect, int minimumNr, int labelHeight ) : int[]

Method Details

DrawPreview() public method

This is the first entry point for Preview Drawing.

public DrawPreview ( Rect previewArea ) : void
previewArea UnityEngine.Rect The available area to draw the preview.
return void

GetInfoString() public method

Implement this method to show object information on top of the object preview.

public GetInfoString ( ) : string
return string

GetPreviewTitle() public method

Override this method if you want to change the label of the Preview area.

public GetPreviewTitle ( ) : GUIContent
return UnityEngine.GUIContent

HasPreviewGUI() public method

Can this component be Previewed in its current state?

public HasPreviewGUI ( ) : bool
return bool

Initialize() public method

Called when the Preview gets created with the objects being previewed.

public Initialize ( Object targets ) : void
targets Object The objects being previewed.
return void

MoveNextTarget() public method

Called to iterate through the targets, this will be used when previewing more than one target.

public MoveNextTarget ( ) : bool
return bool

OnInteractivePreviewGUI() public method

Implement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector.

public OnInteractivePreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect Rectangle in which to draw the preview.
background UnityEngine.GUIStyle Background image.
return void

OnPreviewGUI() public method

Implement to create your own custom preview for the preview area of the inspector, primary editor headers and the object selector.

public OnPreviewGUI ( Rect r, GUIStyle background ) : void
r UnityEngine.Rect Rectangle in which to draw the preview.
background UnityEngine.GUIStyle Background image.
return void

OnPreviewSettings() public method

Override this method if you want to show custom controls in the preview header.

public OnPreviewSettings ( ) : void
return void

ReloadPreviewInstances() public method

public ReloadPreviewInstances ( ) : void
return void

ResetTarget() public method

Called to Reset the target before iterating through them.

public ResetTarget ( ) : void
return void

Property Details

m_ReferenceTargetIndex protected_oe property

protected int m_ReferenceTargetIndex
return int

m_Targets protected_oe property

protected Object[] m_Targets
return Object[]