# Camera Scaled Pixel Width

[Rendering](../index.md) / [Camera](index.md) / **Camera Scaled Pixel Width**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

The Scaled Pixel Width property of the Camera component

## Code

```cs
// <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 Scaled Pixel Width")]
    [Category("Rendering/Camera/Scaled Pixel Width")]
    [Description("The Scaled Pixel Width property of the Camera component")]
    
    [Image(typeof(IconCamera), ColorTheme.Type.Blue)]
    
    [Serializable]
    public class GenTypeInteger_Camera_ScaledPixelWidth : 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.scaledPixelWidth : default;
        }
        
        public override double Get(Args args)
        {
            Camera instance = this.m_Camera.Get<Camera>(args);
            return instance != null
                ? instance.scaledPixelWidth
                : default;
        }
        
        public override string ToString()
        {
            return $"{this.m_Camera} Scaled Pixel Width";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

