Transform Set As Last Sibling#
Transform / Hierarchy / Transform Set As Last Sibling
Description#
Move the transform to the end of the local transform list
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;
namespace VisualScript.Runtime
{
[Title("Transform Set As Last Sibling")]
[Category("Transform/Hierarchy/Set As Last Sibling")]
[Description("Move the transform to the end of the local transform list")]
[Image(typeof(IconCubeOutline), ColorTheme.Type.Lime, typeof(BadgeArrowRight))]
[Keywords("Transform")]
[Serializable]
public class GenInstructionTransform_SetAsLastSibling_0 : Instruction
{
[SerializeField] private GetGameObject m_Transform = new GetGameObject(
new GenTypeGameObject_Transform()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set As Last Sibling");
return $"{this.m_Transform} {method}";
}
protected override Awaitable Run(Args args)
{
Transform component = this.m_Transform.Get<Transform>(args);
if (component == null) return Done;
component.SetAsLastSibling();
return Done;
}
}
}