Class FieldOfViewToFocalLength
A component that synchronizes the field of view of a camera with its focal length.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: Unity.LiveCapture.Cameras
Syntax
[ExecuteAlways]
[RequireComponent(typeof(Camera))]
[HelpURL("https://docs.unity.cn/Packages/com.unity.live-capture@4.0/manual/ref-component-field-of-view-to-focal-length.html")]
public sealed class FieldOfViewToFocalLength : MonoBehaviour, IPreviewable
Remarks
When the camera is using physical properties, Unity ignores any field of view value set from an animation clip. This component allows the field of view to be animated while maintaining the correct focal length. When not using physical properties, the component will update the field of view field to match the camera's one.
Properties
FieldOfView
The field of view of the camera.
Declaration
public float FieldOfView { get; set; }
Property Value
| Type | Description |
|---|---|
| Single |
Explicit Interface Implementations
IPreviewable.Register(IPropertyPreviewer)
The preview system calls this method before playing animations. Use the specified IPropertyPreviewer to register animated properties.
Declaration
void IPreviewable.Register(IPropertyPreviewer previewer)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyPreviewer | previewer | The IPropertyPreviewer to register animated properties to. |