Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Camera Anamorphism#

Rendering / Camera / Camera Anamorphism

  • Can Read

  • Can Write

Description#

The Anamorphism property of 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
{
    [Get]
    [Set]
    
    [Title("Camera Anamorphism")]
    [Category("Rendering/Camera/Anamorphism")]
    [Description("The Anamorphism property of the Camera component")]
    
    [Image(typeof(IconCamera), ColorTheme.Type.Blue)]
    
    [Serializable]
    public class GenTypeNumber_Camera_Anamorphism : TypeNumber
    {
        [SerializeField] private GetGameObject m_Camera = new GetGameObject(
            new GenTypeGameObject_Camera()
        );
        
        public override double GetPreview(GameObject source)
        {
            GameObject instance = this.m_Camera.GetPreview(source);
            if (instance == null) return default;
            
            Camera component = instance.GetComponent<Camera>();
            return component != null ? component.anamorphism : default;
        }
        
        public override double Get(Args args)
        {
            Camera instance = this.m_Camera.Get<Camera>(args);
            return instance != null
                ? instance.anamorphism
                : default;
        }
        
        public override void Set(double value, Args args)
        {
            Camera component = this.m_Camera.Get<Camera>(args);
            if (component != null) component.anamorphism = (float) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_Camera} Anamorphism";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.