C# Class UnityEditor.ObjectPreview

Inheritance: IPreviewable
Afficher le fichier Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Protected Properties

Свойство Type Description
m_ReferenceTargetIndex int
m_Targets Object[]

Méthodes publiques

Méthode 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

Méthode 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 méthode

This is the first entry point for Preview Drawing.

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

GetInfoString() public méthode

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

public GetInfoString ( ) : string
Résultat string

GetPreviewTitle() public méthode

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

public GetPreviewTitle ( ) : GUIContent
Résultat UnityEngine.GUIContent

HasPreviewGUI() public méthode

Can this component be Previewed in its current state?

public HasPreviewGUI ( ) : bool
Résultat bool

Initialize() public méthode

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

public Initialize ( Object targets ) : void
targets Object The objects being previewed.
Résultat void

MoveNextTarget() public méthode

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

public MoveNextTarget ( ) : bool
Résultat bool

OnInteractivePreviewGUI() public méthode

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.
Résultat void

OnPreviewGUI() public méthode

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.
Résultat void

OnPreviewSettings() public méthode

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

public OnPreviewSettings ( ) : void
Résultat void

ReloadPreviewInstances() public méthode

public ReloadPreviewInstances ( ) : void
Résultat void

ResetTarget() public méthode

Called to Reset the target before iterating through them.

public ResetTarget ( ) : void
Résultat void

Property Details

m_ReferenceTargetIndex protected_oe property

protected int m_ReferenceTargetIndex
Résultat int

m_Targets protected_oe property

protected Object[] m_Targets
Résultat Object[]