Grid Inverse Swizzle#
Miscellaneous / Grid / Grid Inverse Swizzle
Description#
Compares the Inverse Swizzle static method of Grid class to another value
Parameters#
| Name | Description |
|---|---|
| Swizzle | |
| Position | |
| 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("Grid Inverse Swizzle")]
[Category("Miscellaneous/Grid/Inverse Swizzle")]
[Description("Compares the Inverse Swizzle static method of Grid class to another value")]
[Image(typeof(IconGrid), ColorTheme.Type.Purple)]
[Keywords("Tile")]
[Parameter("Swizzle")]
[Parameter("Position")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_Grid_CheckInverseSwizzle_2 : Condition
{
[SerializeField] private GetVector3 m_Value = new GetVector3();
[SerializeField] private GridLayout.CellSwizzle m_Swizzle = default;
[SerializeField] private GetVector3 m_Position = new GetVector3();
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Grid");
string method = TextUtils.ThemeAsKeyword("Inverse Swizzle");
return $"{className} {method} ({this.m_Swizzle}, {this.m_Position}) = {this.m_Value}";
}
protected override bool Run(Args args)
{
Vector3 value = Grid.InverseSwizzle(
this.m_Swizzle,
(Vector3) this.m_Position.Get(args)
);
return value == (Vector3) this.m_Value.Get(args);
}
}
}