Set Grid Layout Group Constraint Count#
UI / Layout / Grid Layout Group / Set Grid Layout Group Constraint Count
Description#
Sets the Constraint Count property of Grid Layout Group component
Parameters#
| Name | Description |
|---|---|
| Grid Layout Group | |
| 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;
using UnityEngine.UI;
namespace VisualScript.Runtime
{
[Title("Set Grid Layout Group Constraint Count")]
[Category("UI/Layout/Grid Layout Group/Constraint Count")]
[Description("Sets the Constraint Count property of Grid Layout Group component")]
[Image(typeof(IconGridLayoutGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Parameter("Grid Layout Group")]
[Parameter("Value")]
[Serializable]
public class GenInstructionInteger_GridLayoutGroup_SetConstraintCount : Instruction
{
[SerializeField] private GetGameObject m_GridLayoutGroup = new GetGameObject(
new GenTypeGameObject_GridLayoutGroup()
);
[SerializeField] private GetInteger m_Value = new GetInteger();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Constraint Count");
return $"{this.m_GridLayoutGroup} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
GridLayoutGroup component = this.m_GridLayoutGroup.Get<GridLayoutGroup>(args);
if (component == null) return Done;
component.constraintCount = (int) this.m_Value.Get(args);
return Done;
}
}
}