Show / Hide Table of Contents

Class PreviewRenderUtility

Inheritance
Object
PreviewRenderUtility
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEditor
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
Type Name Description
Boolean renderFullScene
Boolean pixelPerfect

Fields

| Improve this Doc View Source

m_Camera

Declaration
[Obsolete("Use the property camera instead (UnityUpgradable) -> camera", false)]
public Camera m_Camera
Field Value
Type Description
Camera
| Improve this Doc View Source

m_CameraFieldOfView

Declaration
[Obsolete("Use the property cameraFieldOfView (UnityUpgradable) -> cameraFieldOfView", false)]
public float m_CameraFieldOfView
Field Value
Type Description
Single
| Improve this Doc View Source

m_Light

Declaration
[Obsolete("Use the property lights (UnityUpgradable) -> lights", false)]
public Light[] m_Light
Field Value
Type Description
Light[]

Properties

| Improve this Doc View Source

ambientColor

Declaration
public Color ambientColor { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

camera

Declaration
public Camera camera { get; }
Property Value
Type Description
Camera
| Improve this Doc View Source

cameraFieldOfView

Declaration
public float cameraFieldOfView { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

lights

Declaration
public Light[] lights { get; }
Property Value
Type Description
Light[]

Methods

| Improve this Doc View Source

AddSingleGO(GameObject)

Declaration
public void AddSingleGO(GameObject go)
Parameters
Type Name Description
GameObject go
| 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
Type Name Description
GameObject go
Boolean instantiateAtZero
| Improve this Doc View Source

BeginPreview(Rect, GUIStyle)

Declaration
public void BeginPreview(Rect r, GUIStyle previewBackground)
Parameters
Type Name Description
Rect r
GUIStyle previewBackground
| 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
Type Name Description
Rect r
GUIStyle previewBackground
| 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
public void Cleanup()
| Improve this Doc View Source

CreateLight()

Declaration
protected static GameObject CreateLight()
Returns
Type Description
GameObject
| Improve this Doc View Source

DrawMesh(Mesh, Matrix4x4, Material, Int32)

Declaration
public void DrawMesh(Mesh mesh, Matrix4x4 matrix, Material mat, int subMeshIndex)
Parameters
Type Name Description
Mesh mesh
Matrix4x4 matrix
Material mat
Int32 subMeshIndex
| 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
Type Name Description
Mesh mesh
Matrix4x4 matrix
Material mat
Int32 subMeshIndex
MaterialPropertyBlock customProperties
| Improve this Doc View Source

DrawMesh(Mesh, Matrix4x4, Material, Int32, MaterialPropertyBlock, Transform, Boolean)

Declaration
public void DrawMesh(Mesh mesh, Matrix4x4 m, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor, bool useLightProbe)
Parameters
Type Name Description
Mesh mesh
Matrix4x4 m
Material mat
Int32 subMeshIndex
MaterialPropertyBlock customProperties
Transform probeAnchor
Boolean useLightProbe
| 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
Type Name Description
Mesh mesh
Vector3 pos
Quaternion rot
Material mat
Int32 subMeshIndex
| 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
Type Name Description
Mesh mesh
Vector3 pos
Quaternion rot
Material mat
Int32 subMeshIndex
MaterialPropertyBlock customProperties
| Improve this Doc View Source

DrawMesh(Mesh, Vector3, Quaternion, Material, Int32, MaterialPropertyBlock, Transform)

Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor)
Parameters
Type Name Description
Mesh mesh
Vector3 pos
Quaternion rot
Material mat
Int32 subMeshIndex
MaterialPropertyBlock customProperties
Transform probeAnchor
| Improve this Doc View Source

DrawMesh(Mesh, Vector3, Quaternion, Material, Int32, MaterialPropertyBlock, Transform, Boolean)

Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor, bool useLightProbe)
Parameters
Type Name Description
Mesh mesh
Vector3 pos
Quaternion rot
Material mat
Int32 subMeshIndex
MaterialPropertyBlock customProperties
Transform probeAnchor
Boolean useLightProbe
| Improve this Doc View Source

DrawMesh(Mesh, Vector3, Vector3, Quaternion, Material, Int32, MaterialPropertyBlock, Transform, Boolean)

Declaration
public void DrawMesh(Mesh mesh, Vector3 pos, Vector3 scale, Quaternion rot, Material mat, int subMeshIndex, MaterialPropertyBlock customProperties, Transform probeAnchor, bool useLightProbe)
Parameters
Type Name Description
Mesh mesh
Vector3 pos
Vector3 scale
Quaternion rot
Material mat
Int32 subMeshIndex
MaterialPropertyBlock customProperties
Transform probeAnchor
Boolean useLightProbe
| 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
Type Description
Texture
| Improve this Doc View Source

EndStaticPreview()

Declaration
public Texture2D EndStaticPreview()
Returns
Type Description
Texture2D
| 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
Type Name Description
Single width
Single height
Returns
Type Description
Single
| Improve this Doc View Source

InstantiatePrefabInScene(GameObject)

Declaration
public GameObject InstantiatePrefabInScene(GameObject prefab)
Parameters
Type Name Description
GameObject prefab
Returns
Type Description
GameObject
| 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

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX