Set Transform Has Changed#
Transform / Hierarchy / Set Transform Has Changed
Description#
Whether the transform has changed since last time it was checked
Parameters#
| Name | Description |
|---|---|
| Transform | |
| 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;
namespace VisualScript.Runtime
{
[Title("Set Transform Has Changed")]
[Category("Transform/Hierarchy/Has Changed")]
[Description("Whether the transform has changed since last time it was checked")]
[Image(typeof(IconTransform), ColorTheme.Type.Lime, typeof(BadgeBolt))]
[Keywords("Transform")]
[Parameter("Transform")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_Transform_SetHasChanged : Instruction
{
[SerializeField] private GetGameObject m_Transform = new GetGameObject(
new GenTypeGameObject_Transform()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Has Changed");
return $"{this.m_Transform} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
Transform component = this.m_Transform.Get<Transform>(args);
if (component == null) return Done;
component.hasChanged = (bool) this.m_Value.Get(args);
return Done;
}
}
}