Set Vertical Layout Group Child Control Height#
UI / Layout / Vertical Layout Group / Set Vertical Layout Group Child Control Height
Description#
Sets the Child Control Height property of Vertical Layout Group component
Parameters#
| Name | Description |
|---|---|
| Vertical 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 Vertical Layout Group Child Control Height")]
[Category("UI/Layout/Vertical Layout Group/Child Control Height")]
[Description("Sets the Child Control Height property of Vertical Layout Group component")]
[Image(typeof(IconVerticalLayoutGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Parameter("Vertical Layout Group")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_VerticalLayoutGroup_SetChildControlHeight : Instruction
{
[SerializeField] private GetGameObject m_VerticalLayoutGroup = new GetGameObject(
new GenTypeGameObject_VerticalLayoutGroup()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Child Control Height");
return $"{this.m_VerticalLayoutGroup} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
VerticalLayoutGroup component = this.m_VerticalLayoutGroup.Get<VerticalLayoutGroup>(args);
if (component == null) return Done;
component.childControlHeight = (bool) this.m_Value.Get(args);
return Done;
}
}
}