Line Renderer Get Position#
Effects / Line Renderer / Line Renderer Get Position
Description#
Compares the Get Position method of Line Renderer component to another value
Parameters#
| Name | Description |
|---|---|
| Line Renderer | |
| Index | |
| 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("Line Renderer Get Position")]
[Category("Effects/Line Renderer/Get Position")]
[Description("Compares the Get Position method of Line Renderer component to another value")]
[Image(typeof(IconLineRenderer), ColorTheme.Type.Blue, typeof(BadgeEye))]
[Keywords("Effect")]
[Parameter("Line Renderer")]
[Parameter("Index")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_LineRenderer_CheckGetPosition_1 : Condition
{
[SerializeField] private GetGameObject m_LineRenderer = new GetGameObject(
new GenTypeGameObject_LineRenderer()
);
[SerializeField] private GetVector3 m_Value = new GetVector3();
[SerializeField] private GetInteger m_Index = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Get Position");
string parameters = $"({this.m_Index})";
return $"{this.m_LineRenderer} {method} = {this.m_Value}";
}
protected override bool Run(Args args)
{
LineRenderer component = this.m_LineRenderer.Get<LineRenderer>(args);
if (component == null) return false;
Vector3 value = component.GetPosition(
(int) this.m_Index.Get(args)
);
return value == (Vector3) this.m_Value.Get(args);
}
}
}