---
tags:
    - "Tile"
---

# Grid Cell Size

[Miscellaneous](../index.md) / [Grid](index.md) / **Grid Cell Size**

## Description

Compares the Cell Size property of Grid component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Grid |  |
| Value |  |

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

namespace VisualScript.Runtime
{
    [Title("Grid Cell Size")]
    [Category("Miscellaneous/Grid/Cell Size")]
    [Description("Compares the Cell Size property of Grid component to another value")]
    
    [Image(typeof(IconGrid), ColorTheme.Type.Purple)]
    [Keywords("Tile")]
    
    [Parameter("Grid")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionVector3_Grid_CheckCellSize : Condition
    {
        [SerializeField] private GetGameObject m_Grid = new GetGameObject(
            new GenTypeGameObject_Grid()
        );
        
        [SerializeField] private GetVector3 m_Value = new GetVector3();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Cell Size");
            return $"{this.m_Grid} {member} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            Grid component = this.m_Grid.Get<Grid>(args);
            if (component == null) return false;
            
            return component.cellSize == (Vector3) this.m_Value.Get(args);
        }
    }
}


```

