Class CinemachineLensPresets | Package Manager UI website
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
    System.Object
    CinemachineLensPresets
    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
    public CinemachineLensPresets.PhysicalPreset[] m_PhysicalPresets
    Field Value
    Type Description
    CinemachineLensPresets.PhysicalPreset[]

    m_Presets

    The array containing Preset definitions for nonphysical cameras

    Declaration
    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
    System.Single focalLength
    Returns
    Type Description
    System.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 fov)
    Parameters
    Type Name Description
    System.Single fov
    Returns
    Type Description
    System.Int32

    the preset index, or -1 if no matching preset

    Back to top
    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