docs.unity3d.com
    Show / Hide Table of Contents

    Class CinemachineLensPresets

    User-definable named presets for lenses. This is a Singleton asset, available in editor only

    Inheritance
    Object
    Object
    ScriptableObject
    CinemachineLensPresets
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Cinemachine.Editor
    Syntax
    [DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
    [Serializable]
    public sealed class CinemachineLensPresets : ScriptableObject

    Fields

    m_PhysicalPresets

    The array containing Preset definitions, for physical cameras

    Declaration
    [Tooltip("The array containing Preset definitions, for physical cameras")]
    public CinemachineLensPresets.PhysicalPreset[] m_PhysicalPresets
    Field Value
    Type Description
    CinemachineLensPresets.PhysicalPreset[]

    m_Presets

    The array containing Preset definitions for nonphysical cameras

    Declaration
    [Tooltip("The array containing Preset definitions, for nonphysical cameras")]
    public CinemachineLensPresets.Preset[] m_Presets
    Field Value
    Type Description
    CinemachineLensPresets.Preset[]

    Properties

    Instance

    Get the singleton instance of this object. Creates asset if nonexistant

    Declaration
    public static CinemachineLensPresets Instance { get; }
    Property Value
    Type Description
    CinemachineLensPresets

    InstanceIfExists

    Get the singleton instance of this object, or null if it doesn't exist

    Declaration
    public static CinemachineLensPresets InstanceIfExists { get; }
    Property Value
    Type Description
    CinemachineLensPresets

    Methods

    GetMatchingPhysicalPreset(Single)

    Get the index of the physical preset that matches the lens settings

    Declaration
    public int GetMatchingPhysicalPreset(float focalLength)
    Parameters
    Type Name Description
    Single focalLength

    Focal length to match

    Returns
    Type Description
    Int32

    the preset index, or -1 if no matching preset

    GetMatchingPreset(Single)

    Get the index of the preset that matches the lens settings

    Declaration
    public int GetMatchingPreset(float verticalFOV)
    Parameters
    Type Name Description
    Single verticalFOV

    Vertical field of view

    Returns
    Type Description
    Int32

    the preset index, or -1 if no matching preset

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023