Vertical Layout Group Child Scale Width#
UI / Layout / Vertical Layout Group / Vertical Layout Group Child Scale Width
Can Read
Can Write
Description#
The Child Scale Width property of the Vertical Layout Group component
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
{
[Get]
[Set]
[Title("Vertical Layout Group Child Scale Width")]
[Category("UI/Layout/Vertical Layout Group/Child Scale Width")]
[Description("The Child Scale Width property of the Vertical Layout Group component")]
[Image(typeof(IconVerticalLayoutGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Serializable]
public class GenTypeBool_VerticalLayoutGroup_ChildScaleWidth : TypeBool
{
[SerializeField] private GetGameObject m_VerticalLayoutGroup = new GetGameObject(
new GenTypeGameObject_VerticalLayoutGroup()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_VerticalLayoutGroup.GetPreview(source);
if (instance == null) return default;
VerticalLayoutGroup component = instance.GetComponent<VerticalLayoutGroup>();
return component != null ? component.childScaleWidth : default;
}
public override bool Get(Args args)
{
VerticalLayoutGroup instance = this.m_VerticalLayoutGroup.Get<VerticalLayoutGroup>(args);
return instance != null
? instance.childScaleWidth
: default;
}
public override void Set(bool value, Args args)
{
VerticalLayoutGroup component = this.m_VerticalLayoutGroup.Get<VerticalLayoutGroup>(args);
if (component != null) component.childScaleWidth = (bool) value;
}
public override string ToString()
{
return $"{this.m_VerticalLayoutGroup} Child Scale Width";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}