Class Camera
Assembly: UnityEngine.dll
Syntax
[RequireComponent(typeof(Transform))]
public sealed class Camera : Behaviour
Fields
|
Improve this Doc
View Source
onPostRender
Declaration
public static Camera.CameraCallback onPostRender
Field Value
|
Improve this Doc
View Source
onPreCull
Declaration
public static Camera.CameraCallback onPreCull
Field Value
|
Improve this Doc
View Source
onPreRender
Declaration
public static Camera.CameraCallback onPreRender
Field Value
Properties
activeTexture
Declaration
public RenderTexture activeTexture { get; }
Property Value
actualRenderingPath
Declaration
public RenderingPath actualRenderingPath { get; }
Property Value
|
Improve this Doc
View Source
allCameras
Declaration
public static Camera[] allCameras { get; }
Property Value
|
Improve this Doc
View Source
allCamerasCount
Declaration
public static int allCamerasCount { get; }
Property Value
allowDynamicResolution
Declaration
public bool allowDynamicResolution { get; set; }
Property Value
allowHDR
Declaration
public bool allowHDR { get; set; }
Property Value
allowMSAA
Declaration
public bool allowMSAA { get; set; }
Property Value
areVRStereoViewMatricesWithinSingleCullTolerance
Declaration
public bool areVRStereoViewMatricesWithinSingleCullTolerance { get; }
Property Value
aspect
Declaration
public float aspect { get; set; }
Property Value
backgroundColor
Declaration
public Color backgroundColor { get; set; }
Property Value
cameraToWorldMatrix
Declaration
public Matrix4x4 cameraToWorldMatrix { get; }
Property Value
cameraType
Declaration
public CameraType cameraType { get; set; }
Property Value
clearFlags
Declaration
public CameraClearFlags clearFlags { get; set; }
Property Value
clearStencilAfterLightingPass
Declaration
public bool clearStencilAfterLightingPass { get; set; }
Property Value
commandBufferCount
Declaration
public int commandBufferCount { get; }
Property Value
cullingMask
Declaration
public int cullingMask { get; set; }
Property Value
cullingMatrix
Declaration
public Matrix4x4 cullingMatrix { get; set; }
Property Value
current
Declaration
public static Camera current { get; }
Property Value
depth
Declaration
public float depth { get; set; }
Property Value
depthTextureMode
Declaration
public DepthTextureMode depthTextureMode { get; set; }
Property Value
eventMask
Declaration
public int eventMask { get; set; }
Property Value
farClipPlane
Declaration
public float farClipPlane { get; set; }
Property Value
fieldOfView
Declaration
public float fieldOfView { get; set; }
Property Value
focalLength
Declaration
public float focalLength { get; set; }
Property Value
forceIntoRenderTexture
Declaration
public bool forceIntoRenderTexture { get; set; }
Property Value
gateFit
Declaration
public Camera.GateFitMode gateFit { get; set; }
Property Value
|
Improve this Doc
View Source
layerCullDistances
Declaration
public float[] layerCullDistances { get; set; }
Property Value
layerCullSpherical
Declaration
public bool layerCullSpherical { get; set; }
Property Value
lensShift
Declaration
public Vector2 lensShift { get; set; }
Property Value
main
Declaration
public static Camera main { get; }
Property Value
nearClipPlane
Declaration
public float nearClipPlane { get; set; }
Property Value
nonJitteredProjectionMatrix
Declaration
public Matrix4x4 nonJitteredProjectionMatrix { get; set; }
Property Value
opaqueSortMode
Declaration
public OpaqueSortMode opaqueSortMode { get; set; }
Property Value
orthographic
Declaration
public bool orthographic { get; set; }
Property Value
orthographicSize
Declaration
public float orthographicSize { get; set; }
Property Value
pixelHeight
Declaration
public int pixelHeight { get; }
Property Value
pixelRect
Declaration
public Rect pixelRect { get; set; }
Property Value
pixelWidth
Declaration
public int pixelWidth { get; }
Property Value
previousViewProjectionMatrix
Declaration
public Matrix4x4 previousViewProjectionMatrix { get; }
Property Value
projectionMatrix
Declaration
public Matrix4x4 projectionMatrix { get; set; }
Property Value
rect
Declaration
public Rect rect { get; set; }
Property Value
renderingPath
Declaration
public RenderingPath renderingPath { get; set; }
Property Value
scaledPixelHeight
Declaration
public int scaledPixelHeight { get; }
Property Value
scaledPixelWidth
Declaration
public int scaledPixelWidth { get; }
Property Value
scene
Declaration
public Scene scene { get; set; }
Property Value
sensorSize
Declaration
public Vector2 sensorSize { get; set; }
Property Value
stereoActiveEye
Declaration
public Camera.MonoOrStereoscopicEye stereoActiveEye { get; }
Property Value
stereoConvergence
Declaration
public float stereoConvergence { get; set; }
Property Value
stereoEnabled
Declaration
public bool stereoEnabled { get; }
Property Value
stereoSeparation
Declaration
public float stereoSeparation { get; set; }
Property Value
stereoTargetEye
Declaration
public StereoTargetEyeMask stereoTargetEye { get; set; }
Property Value
targetDisplay
Declaration
public int targetDisplay { get; set; }
Property Value
targetTexture
Declaration
public RenderTexture targetTexture { get; set; }
Property Value
transparencySortAxis
Declaration
public Vector3 transparencySortAxis { get; set; }
Property Value
transparencySortMode
Declaration
public TransparencySortMode transparencySortMode { get; set; }
Property Value
useJitteredProjectionMatrixForTransparentRendering
Declaration
public bool useJitteredProjectionMatrixForTransparentRendering { get; set; }
Property Value
useOcclusionCulling
Declaration
public bool useOcclusionCulling { get; set; }
Property Value
usePhysicalProperties
Declaration
public bool usePhysicalProperties { get; set; }
Property Value
velocity
Declaration
public Vector3 velocity { get; }
Property Value
worldToCameraMatrix
Declaration
public Matrix4x4 worldToCameraMatrix { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AddCommandBuffer(CameraEvent, CommandBuffer)
Declaration
public void AddCommandBuffer(CameraEvent evt, CommandBuffer buffer)
Parameters
|
Improve this Doc
View Source
AddCommandBufferAsync(CameraEvent, CommandBuffer, ComputeQueueType)
Declaration
public void AddCommandBufferAsync(CameraEvent evt, CommandBuffer buffer, ComputeQueueType queueType)
Parameters
|
Improve this Doc
View Source
CalculateFrustumCorners(Rect, Single, Camera.MonoOrStereoscopicEye, Vector3[])
Declaration
public void CalculateFrustumCorners(Rect viewport, float z, Camera.MonoOrStereoscopicEye eye, Vector3[] outCorners)
Parameters
CalculateObliqueMatrix(Vector4)
Declaration
public Matrix4x4 CalculateObliqueMatrix(Vector4 clipPlane)
Parameters
Type |
Name |
Description |
Vector4 |
clipPlane |
|
Returns
|
Improve this Doc
View Source
CalculateProjectionMatrixFromPhysicalProperties(out Matrix4x4, Single, Vector2, Vector2, Single, Single, Camera.GateFitParameters)
Declaration
public static void CalculateProjectionMatrixFromPhysicalProperties(out Matrix4x4 output, float focalLength, Vector2 sensorSize, Vector2 lensShift, float nearClip, float farClip, Camera.GateFitParameters gateFitParameters = default(Camera.GateFitParameters))
Parameters
CopyFrom(Camera)
Declaration
public void CopyFrom(Camera other)
Parameters
Type |
Name |
Description |
Camera |
other |
|
CopyStereoDeviceProjectionMatrixToNonJittered(Camera.StereoscopicEye)
Declaration
public void CopyStereoDeviceProjectionMatrixToNonJittered(Camera.StereoscopicEye eye)
Parameters
FocalLengthToFOV(Single, Single)
Declaration
public static float FocalLengthToFOV(float focalLength, float sensorSize)
Parameters
Returns
FOVToFocalLength(Single, Single)
Declaration
public static float FOVToFocalLength(float fov, float sensorSize)
Parameters
Returns
|
Improve this Doc
View Source
GetAllCameras(Camera[])
Declaration
public static int GetAllCameras(Camera[] cameras)
Parameters
Type |
Name |
Description |
Camera[] |
cameras |
|
Returns
GetCommandBuffers(CameraEvent)
Declaration
public CommandBuffer[] GetCommandBuffers(CameraEvent evt)
Parameters
Returns
GetStereoNonJitteredProjectionMatrix(Camera.StereoscopicEye)
Declaration
public Matrix4x4 GetStereoNonJitteredProjectionMatrix(Camera.StereoscopicEye eye)
Parameters
Returns
GetStereoProjectionMatrix(Camera.StereoscopicEye)
Declaration
public Matrix4x4 GetStereoProjectionMatrix(Camera.StereoscopicEye eye)
Parameters
Returns
GetStereoViewMatrix(Camera.StereoscopicEye)
Declaration
public Matrix4x4 GetStereoViewMatrix(Camera.StereoscopicEye eye)
Parameters
Returns
RemoveAllCommandBuffers()
Declaration
public void RemoveAllCommandBuffers()
|
Improve this Doc
View Source
RemoveCommandBuffer(CameraEvent, CommandBuffer)
Declaration
public void RemoveCommandBuffer(CameraEvent evt, CommandBuffer buffer)
Parameters
RemoveCommandBuffers(CameraEvent)
Declaration
public void RemoveCommandBuffers(CameraEvent evt)
Parameters
Render()
Declaration
RenderDontRestore()
Declaration
public void RenderDontRestore()
|
Improve this Doc
View Source
RenderToCubemap(Cubemap)
Declaration
public bool RenderToCubemap(Cubemap cubemap)
Parameters
Type |
Name |
Description |
Cubemap |
cubemap |
|
Returns
|
Improve this Doc
View Source
RenderToCubemap(Cubemap, Int32)
Declaration
public bool RenderToCubemap(Cubemap cubemap, int faceMask)
Parameters
Returns
|
Improve this Doc
View Source
RenderToCubemap(RenderTexture)
Declaration
public bool RenderToCubemap(RenderTexture cubemap)
Parameters
Returns
|
Improve this Doc
View Source
RenderToCubemap(RenderTexture, Int32)
Declaration
public bool RenderToCubemap(RenderTexture cubemap, int faceMask)
Parameters
Returns
|
Improve this Doc
View Source
RenderToCubemap(RenderTexture, Int32, Camera.MonoOrStereoscopicEye)
Declaration
public bool RenderToCubemap(RenderTexture cubemap, int faceMask, Camera.MonoOrStereoscopicEye stereoEye)
Parameters
Returns
RenderWithShader(Shader, String)
Declaration
public void RenderWithShader(Shader shader, string replacementTag)
Parameters
Reset()
Declaration
ResetAspect()
Declaration
public void ResetAspect()
ResetCullingMatrix()
Declaration
public void ResetCullingMatrix()
ResetProjectionMatrix()
Declaration
public void ResetProjectionMatrix()
ResetReplacementShader()
Declaration
public void ResetReplacementShader()
ResetStereoProjectionMatrices()
Declaration
public void ResetStereoProjectionMatrices()
ResetStereoViewMatrices()
Declaration
public void ResetStereoViewMatrices()
ResetTransparencySortSettings()
Declaration
public void ResetTransparencySortSettings()
ResetWorldToCameraMatrix()
Declaration
public void ResetWorldToCameraMatrix()
|
Improve this Doc
View Source
ScreenPointToRay(Vector3)
Declaration
public Ray ScreenPointToRay(Vector3 pos)
Parameters
Returns
|
Improve this Doc
View Source
ScreenPointToRay(Vector3, Camera.MonoOrStereoscopicEye)
Declaration
public Ray ScreenPointToRay(Vector3 pos, Camera.MonoOrStereoscopicEye eye)
Parameters
Returns
ScreenToViewportPoint(Vector3)
Declaration
public Vector3 ScreenToViewportPoint(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
|
Improve this Doc
View Source
ScreenToWorldPoint(Vector3)
Declaration
public Vector3 ScreenToWorldPoint(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
ScreenToWorldPoint(Vector3, Camera.MonoOrStereoscopicEye)
Declaration
public Vector3 ScreenToWorldPoint(Vector3 position, Camera.MonoOrStereoscopicEye eye)
Parameters
Returns
SetReplacementShader(Shader, String)
Declaration
public void SetReplacementShader(Shader shader, string replacementTag)
Parameters
SetStereoProjectionMatrix(Camera.StereoscopicEye, Matrix4x4)
Declaration
public void SetStereoProjectionMatrix(Camera.StereoscopicEye eye, Matrix4x4 matrix)
Parameters
SetStereoViewMatrix(Camera.StereoscopicEye, Matrix4x4)
Declaration
public void SetStereoViewMatrix(Camera.StereoscopicEye eye, Matrix4x4 matrix)
Parameters
|
Improve this Doc
View Source
SetTargetBuffers(RenderBuffer, RenderBuffer)
Declaration
public void SetTargetBuffers(RenderBuffer colorBuffer, RenderBuffer depthBuffer)
Parameters
|
Improve this Doc
View Source
SetTargetBuffers(RenderBuffer[], RenderBuffer)
Declaration
public void SetTargetBuffers(RenderBuffer[] colorBuffer, RenderBuffer depthBuffer)
Parameters
SetupCurrent(Camera)
Declaration
public static void SetupCurrent(Camera cur)
Parameters
Type |
Name |
Description |
Camera |
cur |
|
|
Improve this Doc
View Source
ViewportPointToRay(Vector3)
Declaration
public Ray ViewportPointToRay(Vector3 pos)
Parameters
Returns
|
Improve this Doc
View Source
ViewportPointToRay(Vector3, Camera.MonoOrStereoscopicEye)
Declaration
public Ray ViewportPointToRay(Vector3 pos, Camera.MonoOrStereoscopicEye eye)
Parameters
Returns
ViewportToScreenPoint(Vector3)
Declaration
public Vector3 ViewportToScreenPoint(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
|
Improve this Doc
View Source
ViewportToWorldPoint(Vector3)
Declaration
public Vector3 ViewportToWorldPoint(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
ViewportToWorldPoint(Vector3, Camera.MonoOrStereoscopicEye)
Declaration
public Vector3 ViewportToWorldPoint(Vector3 position, Camera.MonoOrStereoscopicEye eye)
Parameters
Returns
|
Improve this Doc
View Source
WorldToScreenPoint(Vector3)
Declaration
public Vector3 WorldToScreenPoint(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
WorldToScreenPoint(Vector3, Camera.MonoOrStereoscopicEye)
Declaration
public Vector3 WorldToScreenPoint(Vector3 position, Camera.MonoOrStereoscopicEye eye)
Parameters
Returns
|
Improve this Doc
View Source
WorldToViewportPoint(Vector3)
Declaration
public Vector3 WorldToViewportPoint(Vector3 position)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
Returns
WorldToViewportPoint(Vector3, Camera.MonoOrStereoscopicEye)
Declaration
public Vector3 WorldToViewportPoint(Vector3 position, Camera.MonoOrStereoscopicEye eye)
Parameters
Returns
Extension Methods