Class CinemachinePhysicalLensPalette
User-definable named presets for physical lenses. This is a Singleton asset, available in editor only
Inherited Members
Namespace: Unity.Cinemachine.Editor
Assembly: Unity.Cinemachine.Editor.dll
Syntax
[Serializable]
public sealed class CinemachinePhysicalLensPalette : ScriptableObject
Fields
Presets
The array containing Preset definitions, for physical cameras
Declaration
[Tooltip("The array containing Preset definitions, for physical cameras")]
public List<CinemachinePhysicalLensPalette.Preset> Presets
Field Value
Type | Description |
---|---|
List<Cinemachine |
Properties
Instance
Get the singleton instance of this object. Creates asset if nonexistent
Declaration
public static CinemachinePhysicalLensPalette Instance { get; }
Property Value
Type | Description |
---|---|
Cinemachine |
InstanceIfExists
Get the singleton instance of this object, or null if it doesn't exist
Declaration
public static CinemachinePhysicalLensPalette InstanceIfExists { get; }
Property Value
Type | Description |
---|---|
Cinemachine |
Methods
GetMatchingPreset(Preset)
Get the index of the physical preset that matches the template
Declaration
public int GetMatchingPreset(CinemachinePhysicalLensPalette.Preset p)
Parameters
Type | Name | Description |
---|---|---|
Cinemachine |
p | Template holding the preset tsettings. Name is ignored. |
Returns
Type | Description |
---|---|
int | the preset index, or -1 if no matching preset |
GetPresetIndex(string)
Get the index of the first physical 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 |