docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CameraState

    Class containing data regarding position, rotation and viewport size of a camera

    Inheritance
    object
    CameraState
    Implements
    ICameraUpdater
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering.LookDev
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    Syntax
    [Serializable]
    public class CameraState : ICameraUpdater

    Properties

    distanceFromPivot

    The distance from pivot

    Declaration
    public float distanceFromPivot { get; }
    Property Value
    Type Description
    float

    farClip

    The far clip distance from camera

    Declaration
    public float farClip { get; }
    Property Value
    Type Description
    float

    fieldOfView

    The field of view of the camera

    Declaration
    public float fieldOfView { get; }
    Property Value
    Type Description
    float

    forward

    The Forward vector in world space

    Declaration
    public Vector3 forward { get; }
    Property Value
    Type Description
    Vector3

    nearClip

    The near clip distance from camera

    Declaration
    public float nearClip { get; }
    Property Value
    Type Description
    float

    pivot

    The position of the camera pivot

    Declaration
    public Vector3 pivot { get; set; }
    Property Value
    Type Description
    Vector3

    position

    The position of the camera

    Declaration
    public Vector3 position { get; }
    Property Value
    Type Description
    Vector3

    right

    The Right vector in world space

    Declaration
    public Vector3 right { get; }
    Property Value
    Type Description
    Vector3

    rotation

    The rotation of the camera arround the pivot

    Declaration
    public Quaternion rotation { get; set; }
    Property Value
    Type Description
    Quaternion

    up

    The Up vector in world space

    Declaration
    public Vector3 up { get; }
    Property Value
    Type Description
    Vector3

    viewSize

    The size of the view

    Declaration
    public float viewSize { get; set; }
    Property Value
    Type Description
    float

    Methods

    Reset()

    Reset the State to its default values

    Declaration
    public void Reset()

    UpdateCamera(Camera)

    Update a Camera component and its transform with this state values

    Declaration
    public void UpdateCamera(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    The camera to update

    Implements

    ICameraUpdater

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)