pub struct Camera {Show 37 fields
pub m_BackGroundColor: ColorRGBA,
pub m_ClearFlags: u32,
pub m_CullingMask: BitField,
pub m_Depth: f32,
pub m_Enabled: u8,
pub m_GameObject: PPtr,
pub m_NormalizedViewPortRect: Rectf,
pub m_RenderingPath: i32,
pub m_TargetTexture: PPtr,
pub orthographic: bool,
pub far_clip_plane: Option<f32>,
pub field_of_view: Option<f32>,
pub m_AllowDynamicResolution: Option<bool>,
pub m_AllowMSAA: Option<bool>,
pub m_Anamorphism: Option<f32>,
pub m_Aperture: Option<f32>,
pub m_BarrelClipping: Option<f32>,
pub m_BladeCount: Option<i32>,
pub m_Curvature: Option<Vector2f>,
pub m_FocalLength: Option<f32>,
pub m_FocusDistance: Option<f32>,
pub m_ForceIntoRT: Option<bool>,
pub m_GateFitMode: Option<i32>,
pub m_HDR: Option<bool>,
pub m_Iso: Option<i32>,
pub m_LensShift: Option<Vector2f>,
pub m_OcclusionCulling: Option<bool>,
pub m_SensorSize: Option<Vector2f>,
pub m_ShutterSpeed: Option<f32>,
pub m_StereoConvergence: Option<f32>,
pub m_StereoMirrorMode: Option<bool>,
pub m_StereoSeparation: Option<f32>,
pub m_TargetDisplay: Option<i64>,
pub m_TargetEye: Option<i32>,
pub m_projectionMatrixMode: Option<i32>,
pub near_clip_plane: Option<f32>,
pub orthographic_size: Option<f32>,
}Expand description
Camera is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: A Camera is a device through which the player views the world. A screen space point is defined in pixels. The bottom-left of the screen is (0,0); the right-top
is (pixelWidth,pixelHeight). The z position is in world units from the Camera.A viewport space point is normalized and relative to the Camera. The bottom-left of the Camera is
(0,0); the top-right is (1,1). The z position is in world units from the Camera.A world space point is defined in global coordinates (for example, Transform.position).See Also: camera component.
Fields§
§m_BackGroundColor: ColorRGBAThe color with which the screen will be cleared.
m_ClearFlags: u32How the camera clears the background.
m_CullingMask: BitFieldThis is used to render parts of the Scene selectively.
m_Depth: f32Camera’s depth in the camera rendering order.
m_Enabled: u8Enabled Behaviours are Updated, disabled Behaviours are not.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (3.4.0 - 2022.3.2f1)
m_NormalizedViewPortRect: Rectf§m_RenderingPath: i32The rendering path that should be used, if possible.
m_TargetTexture: PPtrDestination render texture.
PPtr<RenderTexture>: (3.4.0 - 2022.3.2f1)
orthographic: boolIs the camera orthographic (true) or perspective (false)?
far_clip_plane: Option<f32>The distance of the far clipping plane from the Camera, in world units. f32: (3.4.0 - 2022.3.2f1)
field_of_view: Option<f32>The vertical field of view of the Camera, in degrees. f32: (3.4.0 - 2022.3.2f1)
m_AllowDynamicResolution: Option<bool>Dynamic Resolution Scaling. bool: (2017.3.0b1 - 2022.3.2f1)
m_AllowMSAA: Option<bool>MSAA rendering. bool: (5.6.0b1 - 2022.3.2f1)
m_Anamorphism: Option<f32>The camera anamorphism. To use this property, enable UsePhysicalProperties. f32: (2022.2.0b1 - 2022.3.2f1)
m_Aperture: Option<f32>The camera aperture. To use this property, enable UsePhysicalProperties. f32: (2022.2.0b1 - 2022.3.2f1)
m_BarrelClipping: Option<f32>The camera barrel clipping. To use this property, enable UsePhysicalProperties. f32: (2022.2.0b1 - 2022.3.2f1)
m_BladeCount: Option<i32>The blade count in the lens of the camera. To use this property, enable UsePhysicalProperties. i32: (2022.2.0b1 - 2022.3.2f1)
m_Curvature: Option<Vector2f>The curvature of the blades. To use this property, enable UsePhysicalProperties. Vector2f: (2022.2.0b1 - 2022.3.2f1)
m_FocalLength: Option<f32>The camera focal length, expressed in millimeters. To use this property, enable UsePhysicalProperties. f32: (2018.2.0b1 - 2022.3.2f1)
m_FocusDistance: Option<f32>The focus distance of the lens. To use this property, enable UsePhysicalProperties. f32: (2022.2.0b1 - 2022.3.2f1)
m_ForceIntoRT: Option<bool>bool: (5.6.0b1 - 2022.3.2f1)
m_GateFitMode: Option<i32>i32: (2018.3.0f2 - 2022.3.2f1)
m_HDR: Option<bool>bool: (3.5.0 - 2022.3.2f1)
m_Iso: Option<i32>The sensor sensitivity of the camera. To use this property, enable UsePhysicalProperties. i32: (2022.2.0b1 - 2022.3.2f1)
m_LensShift: Option<Vector2f>The lens offset of the camera. The lens shift is relative to the sensor size. For example, a lens shift of 0.5 offsets the sensor by half its horizontal size. Vector2f: (2018.2.0b1 - 2022.3.2f1)
m_OcclusionCulling: Option<bool>bool: (4.3.0 - 2022.3.2f1)
m_SensorSize: Option<Vector2f>The size of the camera sensor, expressed in millimeters. Vector2f: (2018.2.0b1 - 2022.3.2f1)
m_ShutterSpeed: Option<f32>The exposure time of the camera, in seconts. To use this property, enable UsePhysicalProperties. f32: (2022.2.0b1 - 2022.3.2f1)
m_StereoConvergence: Option<f32>Distance to a point where virtual eyes converge. f32: (4.5.0 - 2022.3.2f1)
m_StereoMirrorMode: Option<bool>bool: (5.1.0f1 - 2017.2.0b10)
m_StereoSeparation: Option<f32>The distance between the virtual eyes. Use this to query or set the current eye separation. Note that most VR devices provide this value, in which case setting the value will have no effect. f32: (4.5.0 - 2022.3.2f1)
m_TargetDisplay: Option<i64>Set the target display for this Camera. u32: (4.5.0 - 5.2.5f1); i32: (5.3.0f1 - 2022.3.2f1)
m_TargetEye: Option<i32>i32: (5.1.3f1 - 2022.3.2f1)
m_projectionMatrixMode: Option<i32>i32: (2018.2.0b1 - 2022.3.2f1)
near_clip_plane: Option<f32>The distance of the near clipping plane from the the Camera, in world units. f32: (3.4.0 - 2022.3.2f1)
orthographic_size: Option<f32>Camera’s half-size when in orthographic mode. f32: (3.4.0 - 2022.3.2f1)