Input Field Flexible Height#
UI / Interaction / Input Field / Input Field Flexible Height
Can Read
Cannot Write
Description#
The Flexible Height property of the Input Field 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]
[Title("Input Field Flexible Height")]
[Category("UI/Interaction/Input Field/Flexible Height")]
[Description("The Flexible Height property of the Input Field component")]
[Image(typeof(IconUIInputField), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Serializable]
public class GenTypeNumber_InputField_FlexibleHeight : TypeNumber
{
[SerializeField] private GetGameObject m_InputField = new GetGameObject(
new GenTypeGameObject_InputField()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_InputField.GetPreview(source);
if (instance == null) return default;
InputField component = instance.GetComponent<InputField>();
return component != null ? component.flexibleHeight : default;
}
public override double Get(Args args)
{
InputField instance = this.m_InputField.Get<InputField>(args);
return instance != null
? instance.flexibleHeight
: default;
}
public override string ToString()
{
return $"{this.m_InputField} Flexible Height";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}