Set Layout Element Ignore Layout#
UI / Layout / Layout Element / Set Layout Element Ignore Layout
Description#
Sets the Ignore Layout property of Layout Element component
Parameters#
| Name | Description |
|---|---|
| Layout Element | |
| 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 Layout Element Ignore Layout")]
[Category("UI/Layout/Layout Element/Ignore Layout")]
[Description("Sets the Ignore Layout property of Layout Element component")]
[Image(typeof(IconLayoutElement), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Parameter("Layout Element")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_LayoutElement_SetIgnoreLayout : Instruction
{
[SerializeField] private GetGameObject m_LayoutElement = new GetGameObject(
new GenTypeGameObject_LayoutElement()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Ignore Layout");
return $"{this.m_LayoutElement} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
LayoutElement component = this.m_LayoutElement.Get<LayoutElement>(args);
if (component == null) return Done;
component.ignoreLayout = (bool) this.m_Value.Get(args);
return Done;
}
}
}