Grid Cell Gap#
Miscellaneous / Grid / Grid Cell Gap
Description#
Compares the Cell Gap property of Grid component to another value
Parameters#
| Name | Description |
|---|---|
| Grid | |
| Value |
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;
namespace VisualScript.Runtime
{
[Title("Grid Cell Gap")]
[Category("Miscellaneous/Grid/Cell Gap")]
[Description("Compares the Cell Gap property of Grid component to another value")]
[Image(typeof(IconGrid), ColorTheme.Type.Purple)]
[Keywords("Tile")]
[Parameter("Grid")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_Grid_CheckCellGap : 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 Gap");
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.cellGap == (Vector3) this.m_Value.Get(args);
}
}
}