---
tags:
    - "Effect"
---

# Trail Renderer Get Position

[Effects](../index.md) / [Trail Renderer](index.md) / **Trail Renderer Get Position**

## Description

Compares the Get Position method of Trail Renderer component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Trail Renderer |  |
| Index |  |
| Value |  |

## Code

```cs
// <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 Get Position")]
    [Category("Effects/Trail Renderer/Get Position")]
    [Description("Compares the Get Position method of Trail Renderer component to another value")]
    
    [Image(typeof(IconTrailRenderer), ColorTheme.Type.Blue, typeof(BadgeEye))]
    [Keywords("Effect")]
    
    [Parameter("Trail Renderer")]
    [Parameter("Index")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionVector3_TrailRenderer_CheckGetPosition_1 : Condition
    {
        [SerializeField] private GetGameObject m_TrailRenderer = new GetGameObject(
            new GenTypeGameObject_TrailRenderer()
        );
        
        [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_TrailRenderer} {method} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            TrailRenderer component = this.m_TrailRenderer.Get<TrailRenderer>(args);
            if (component == null) return false;
            
            Vector3 value = component.GetPosition(
                (int) this.m_Index.Get(args)
            );
            
            return value == (Vector3) this.m_Value.Get(args);
        }
    }
}


```

