Camera Focal Length To Field Of View#
Rendering / Camera / Camera Focal Length To Field Of View
Can Read
Cannot Write
Description#
Returns the execution of Focal Length To Field Of View static method on the Camera class
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.Rendering;
namespace VisualScript.Runtime
{
[Get]
[Title("Camera Focal Length To Field Of View")]
[Category("Rendering/Camera/Focal Length To Field Of View")]
[Description("Returns the execution of Focal Length To Field Of View static method on the Camera class")]
[Image(typeof(IconCamera), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeNumber_Camera_FocalLengthToFieldOfView_2 : TypeNumber
{
[SerializeField] private GetNumber m_FocalLength = new GetNumber();
[SerializeField] private GetNumber m_SensorSize = new GetNumber();
public override double Get(Args args)
{
double value = (double) Camera.FocalLengthToFieldOfView(
(float) this.m_FocalLength.Get(args),
(float) this.m_SensorSize.Get(args)
);
return value;
}
public override string ToString()
{
return $"Camera Focal Length To Field Of View ({this.m_FocalLength}, {this.m_SensorSize})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}