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