Class PreviewRenderUtility
Inheritance
PreviewRenderUtility
Assembly: UnityEditor.dll
Syntax
public class PreviewRenderUtility
Constructors
|
Improve this Doc
View Source
PreviewRenderUtility()
Declaration
public PreviewRenderUtility()
|
Improve this Doc
View Source
PreviewRenderUtility(Boolean)
Declaration
public PreviewRenderUtility(bool renderFullScene)
Parameters
Type |
Name |
Description |
Boolean |
renderFullScene |
|
|
Improve this Doc
View Source
PreviewRenderUtility(Boolean, Boolean)
Declaration
public PreviewRenderUtility(bool renderFullScene, bool pixelPerfect)
Parameters
Fields
|
Improve this Doc
View Source
m_Camera
Declaration
[Obsolete("Use the property camera instead (UnityUpgradable) -> camera", false)]
public Camera m_Camera
Field Value
|
Improve this Doc
View Source
m_CameraFieldOfView
Declaration
[Obsolete("Use the property cameraFieldOfView (UnityUpgradable) -> cameraFieldOfView", false)]
public float m_CameraFieldOfView
Field Value
|
Improve this Doc
View Source
m_Light
Declaration
[Obsolete("Use the property lights (UnityUpgradable) -> lights", false)]
public Light[] m_Light
Field Value
Properties
|
Improve this Doc
View Source
ambientColor
Declaration
public Color ambientColor { get; set; }
Property Value
|
Improve this Doc
View Source
camera
Declaration
public Camera camera { get; }
Property Value
|
Improve this Doc
View Source
cameraFieldOfView
Declaration
public float cameraFieldOfView { get; set; }
Property Value
|
Improve this Doc
View Source
lights
Declaration
public Light[] lights { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddSingleGO(GameObject)
Declaration
public void AddSingleGO(GameObject go)
Parameters
|
Improve this Doc
View Source
AddSingleGO(GameObject, Boolean)
Declaration
[Obsolete("AddSingleGO(GameObject go, bool instantiateAtZero) has been deprecated, use AddSingleGo(GameObject go) instead. instantiateAtZero has no effect and is not supported.")]
public void AddSingleGO(GameObject go, bool instantiateAtZero)
Parameters
|
Improve this Doc
View Source
BeginPreview(Rect, GUIStyle)
Declaration
public void BeginPreview(Rect r, GUIStyle previewBackground)
Parameters
|
Improve this Doc
View Source
BeginPreviewHDR(Rect, GUIStyle)
Declaration
[Obsolete("This method has been marked obsolete, use BeginPreview() instead (UnityUpgradable) -> BeginPreview(*)", false)]
public void BeginPreviewHDR(Rect r, GUIStyle previewBackground)
Parameters
|
Improve this Doc
View Source
BeginStaticPreview(Rect)
Declaration
public void BeginStaticPreview(Rect r)
Parameters
Type |
Name |
Description |
Rect |
r |
|
|
Improve this Doc
View Source
BeginStaticPreviewHDR(Rect)
Declaration
[Obsolete("This method has been marked obsolete, use BeginStaticPreview() instead (UnityUpgradable) -> BeginStaticPreview(*)", false)]
public void BeginStaticPreviewHDR(Rect r)
Parameters
Type |
Name |
Description |
Rect |
r |
|
|
Improve this Doc
View Source
Cleanup()
Declaration
|
Improve this Doc
View Source
CreateLight()
Declaration
protected static GameObject CreateLight()
Returns
|
Improve this Doc
View Source
DrawMesh(Mesh, Matrix4x4, Material, Int32)
Declaration
public void DrawMesh(Mesh mesh, Matrix4x4 matrix, Material mat, int subMeshIndex)
Parameters
|
Improve this Doc
View Source
DrawMesh(Mesh, Matrix4x4, Material, Int32, MaterialPropertyBlock)
Declaration
public void DrawMesh(Mesh mesh, Matrix4x4 matrix, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties)
Parameters
|
Improve this Doc
View Source
Declaration
public void DrawMesh(Mesh mesh, Matrix4x4 m, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor, bool useLightProbe)
Parameters
|
Improve this Doc
View Source
DrawMesh(Mesh, Vector3, Quaternion, Material, Int32)
Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Quaternion rot, Material mat, int subMeshIndex)
Parameters
|
Improve this Doc
View Source
DrawMesh(Mesh, Vector3, Quaternion, Material, Int32, MaterialPropertyBlock)
Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties)
Parameters
|
Improve this Doc
View Source
Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor)
Parameters
|
Improve this Doc
View Source
Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor, bool useLightProbe)
Parameters
|
Improve this Doc
View Source
Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Vector3 scale, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor, bool useLightProbe)
Parameters
|
Improve this Doc
View Source
EndAndDrawPreview(Rect)
Declaration
public void EndAndDrawPreview(Rect r)
Parameters
Type |
Name |
Description |
Rect |
r |
|
|
Improve this Doc
View Source
EndPreview()
Declaration
public Texture EndPreview()
Returns
|
Improve this Doc
View Source
EndStaticPreview()
Declaration
public Texture2D EndStaticPreview()
Returns
|
Improve this Doc
View Source
Finalize()
Declaration
protected void Finalize()
|
Improve this Doc
View Source
GetScaleFactor(Single, Single)
Declaration
public float GetScaleFactor(float width, float height)
Parameters
Returns
|
Improve this Doc
View Source
InstantiatePrefabInScene(GameObject)
Declaration
public GameObject InstantiatePrefabInScene(GameObject prefab)
Parameters
Returns
|
Improve this Doc
View Source
Render(Boolean, Boolean)
Declaration
public void Render(bool allowScriptableRenderPipeline = false, bool updatefov = true)
Parameters
Type |
Name |
Description |
Boolean |
allowScriptableRenderPipeline |
|
Boolean |
updatefov |
|
Extension Methods