Class CinemachineLensPresets
User-definable named presets for lenses. This is a Singleton asset, available in editor only
Inherited Members
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 |