---
tags:
    - "UI, Layout"
---

# Aspect Ratio Fitter Is Component Valid On Object

[UI](../../index.md) / [Layout](../index.md) / [Aspect Ratio Fitter](index.md) / **Aspect Ratio Fitter Is Component Valid On Object**

## Description

Compares the Is Component Valid On Object method of Aspect Ratio Fitter component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Aspect Ratio Fitter |  |

## 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.UI;

namespace VisualScript.Runtime
{
    [Title("Aspect Ratio Fitter Is Component Valid On Object")]
    [Category("UI/Layout/Aspect Ratio Fitter/Is Component Valid On Object")]
    [Description("Compares the Is Component Valid On Object method of Aspect Ratio Fitter component to another value")]
    
    [Image(typeof(IconAspectRatioFitter), ColorTheme.Type.TextLight)]
    [Keywords("UI, Layout")]
    
    [Parameter("Aspect Ratio Fitter")]
    
    [Serializable]
    public class GenConditionBool_AspectRatioFitter_CheckIsComponentValidOnObject_0 : Condition
    {
        [SerializeField] private GetGameObject m_AspectRatioFitter = new GetGameObject(
            new GenTypeGameObject_AspectRatioFitter()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Is Component Valid On Object");
            string parameters = $"()";
            return $"{this.m_AspectRatioFitter} {method}";
        }
        
        protected override bool Run(Args args)
        {
            AspectRatioFitter component = this.m_AspectRatioFitter.Get<AspectRatioFitter>(args);
            if (component == null) return false;
            
            bool value = component.IsComponentValidOnObject();
            
            return value;
        }
    }
}


```

