Camera Reset Aspect#
Rendering / Camera / Camera Reset Aspect
Description#
Executes the Reset Aspect method on the Camera component
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
{
[Title("Camera Reset Aspect")]
[Category("Rendering/Camera/Reset Aspect")]
[Description("Executes the Reset Aspect method on the Camera component")]
[Image(typeof(IconCamera), ColorTheme.Type.Blue)]
[Serializable]
public class GenInstructionCamera_ResetAspect_0 : Instruction
{
[SerializeField] private GetGameObject m_Camera = new GetGameObject(
new GenTypeGameObject_Camera()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Reset Aspect");
return $"{this.m_Camera} {method}";
}
protected override Awaitable Run(Args args)
{
Camera component = this.m_Camera.Get<Camera>(args);
if (component == null) return Done;
component.ResetAspect();
return Done;
}
}
}