Rect Transform Is Coplanar With#
UI / Layout / Rect Transform / Rect Transform Is Coplanar With
Description#
Compares the Is Coplanar With method of Rect Transform component to another value
Parameters#
| Name | Description |
|---|---|
| Rect Transform | |
| Target |
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 Is Coplanar With")]
[Category("UI/Layout/Rect Transform/Is Coplanar With")]
[Description("Compares the Is Coplanar With method of Rect Transform component to another value")]
[Image(typeof(IconRectTransform), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Parameter("Rect Transform")]
[Parameter("Target")]
[Serializable]
public class GenConditionBool_RectTransform_CheckIsCoplanarWith_1 : Condition
{
[SerializeField] private GetGameObject m_RectTransform = new GetGameObject(
new GenTypeGameObject_RectTransform()
);
[SerializeField] private GetGameObject m_Target = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Is Coplanar With");
string parameters = $"({this.m_Target})";
return $"{this.m_RectTransform} {method}";
}
protected override bool Run(Args args)
{
RectTransform component = this.m_RectTransform.Get<RectTransform>(args);
if (component == null) return false;
bool value = component.IsCoplanarWith(
(RectTransform) this.m_Target.Get<RectTransform>(args)
);
return value;
}
}
}