Trail Renderer Set Position#
Effects / Trail Renderer / Trail Renderer Set Position
Description#
Executes the Set Position method on the Trail Renderer component
Parameters#
| Name | Description |
|---|---|
| Index | |
| Position |
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("Trail Renderer Set Position")]
[Category("Effects/Trail Renderer/Set Position")]
[Description("Executes the Set Position method on the Trail Renderer component")]
[Image(typeof(IconTrailRenderer), ColorTheme.Type.Blue, typeof(BadgeEye))]
[Keywords("Effect")]
[Parameter("Index")]
[Parameter("Position")]
[Serializable]
public class GenInstructionTrailRenderer_SetPosition_2 : Instruction
{
[SerializeField] private GetGameObject m_TrailRenderer = new GetGameObject(
new GenTypeGameObject_TrailRenderer()
);
[SerializeField] private GetInteger m_Index = new GetInteger();
[SerializeField] private GetVector3 m_Position = new GetVector3();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Position");
return $"{this.m_TrailRenderer} {method} ({this.m_Index}, {this.m_Position})";
}
protected override Awaitable Run(Args args)
{
TrailRenderer component = this.m_TrailRenderer.Get<TrailRenderer>(args);
if (component == null) return Done;
component.SetPosition(
(int) this.m_Index.Get(args),
(Vector3) this.m_Position.Get(args)
);
return Done;
}
}
}