Class CinemachineLensPalette
User-definable named presets for lenses. This is a Singleton asset, available in editor only
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Cinemachine.Editor
Assembly: Unity.Cinemachine.Editor.dll
Syntax
[Serializable]
public sealed class CinemachineLensPalette : ScriptableObject
Fields
Presets
The array containing Preset definitions for nonphysical cameras
Declaration
[Tooltip("The array containing Preset definitions, for nonphysical cameras")]
public List<CinemachineLensPalette.Preset> Presets
Field Value
Type | Description |
---|---|
List<CinemachineLensPalette.Preset> |
Properties
Instance
Get the singleton instance of this object. Creates asset if nonexistent
Declaration
public static CinemachineLensPalette Instance { get; }
Property Value
Type | Description |
---|---|
CinemachineLensPalette |
InstanceIfExists
Get the singleton instance of this object, or null if it doesn't exist
Declaration
public static CinemachineLensPalette InstanceIfExists { get; }
Property Value
Type | Description |
---|---|
CinemachineLensPalette |
Methods
GetMatchingPreset(float)
Get the index of the preset that matches the lens settings
Declaration
public int GetMatchingPreset(float verticalFOV)
Parameters
Type | Name | Description |
---|---|---|
float | verticalFOV | Vertical field of view |
Returns
Type | Description |
---|---|
int | the preset index, or -1 if no matching preset |
GetPresetIndex(string)
Get the index of the first preset that matches the preset name
Declaration
public int GetPresetIndex(string presetName)
Parameters
Type | Name | Description |
---|---|---|
string | presetName | Name of the preset |
Returns
Type | Description |
---|---|
int | the preset index, or -1 if no matching preset |