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