Sorting Group Sort At Root#
Rendering / Sorting Group / Sorting Group Sort At Root
Description#
Compares the Sort At Root property of Sorting Group component to another value
Parameters#
| Name | Description |
|---|---|
| Sorting Group |
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.Rendering;
namespace VisualScript.Runtime
{
[Title("Sorting Group Sort At Root")]
[Category("Rendering/Sorting Group/Sort At Root")]
[Description("Compares the Sort At Root property of Sorting Group component to another value")]
[Image(typeof(IconSortingGroup), ColorTheme.Type.Purple)]
[Parameter("Sorting Group")]
[Serializable]
public class GenConditionBool_SortingGroup_CheckSortAtRoot : Condition
{
[SerializeField] private GetGameObject m_SortingGroup = new GetGameObject(
new GenTypeGameObject_SortingGroup()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Sort At Root");
return $"{this.m_SortingGroup} {member}";
}
protected override bool Run(Args args)
{
SortingGroup component = this.m_SortingGroup.Get<SortingGroup>(args);
if (component == null) return false;
return component.sortAtRoot;
}
}
}