Camera Field Of View To Focal Length#
Rendering / Camera / Camera Field Of View To Focal Length
Can Read
Cannot Write
Description#
Returns the execution of Field Of View To Focal Length 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 Field Of View To Focal Length")]
[Category("Rendering/Camera/Field Of View To Focal Length")]
[Description("Returns the execution of Field Of View To Focal Length static method on the Camera class")]
[Image(typeof(IconCamera), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeNumber_Camera_FieldOfViewToFocalLength_2 : TypeNumber
{
[SerializeField] private GetNumber m_FieldOfView = new GetNumber();
[SerializeField] private GetNumber m_SensorSize = new GetNumber();
public override double Get(Args args)
{
double value = (double) Camera.FieldOfViewToFocalLength(
(float) this.m_FieldOfView.Get(args),
(float) this.m_SensorSize.Get(args)
);
return value;
}
public override string ToString()
{
return $"Camera Field Of View To Focal Length ({this.m_FieldOfView}, {this.m_SensorSize})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}