Rect Transform Force Update Rect Transforms#
UI / Layout / Rect Transform / Rect Transform Force Update Rect Transforms
Description#
Executes the Force Update Rect Transforms method on the Rect Transform component
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("Rect Transform Force Update Rect Transforms")]
[Category("UI/Layout/Rect Transform/Force Update Rect Transforms")]
[Description("Executes the Force Update Rect Transforms method on the Rect Transform component")]
[Image(typeof(IconRectTransform), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Serializable]
public class GenInstructionRectTransform_ForceUpdateRectTransforms_0 : Instruction
{
[SerializeField] private GetGameObject m_RectTransform = new GetGameObject(
new GenTypeGameObject_RectTransform()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Force Update Rect Transforms");
return $"{this.m_RectTransform} {method}";
}
protected override Awaitable Run(Args args)
{
RectTransform component = this.m_RectTransform.Get<RectTransform>(args);
if (component == null) return Done;
component.ForceUpdateRectTransforms();
return Done;
}
}
}