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

# Trail Renderer Position Count

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

## Description

Compares the Position Count property of Trail Renderer component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Trail Renderer |  |
| Compare |  |
| 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 Position Count")]
    [Category("Effects/Trail Renderer/Position Count")]
    [Description("Compares the Position Count property of Trail Renderer component to another value")]
    
    [Image(typeof(IconTrailRenderer), ColorTheme.Type.Blue, typeof(BadgeEye))]
    [Keywords("Effect")]
    
    [Parameter("Trail Renderer")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionInteger_TrailRenderer_CheckPositionCount : Condition
    {
        [SerializeField] private GetGameObject m_TrailRenderer = new GetGameObject(
            new GenTypeGameObject_TrailRenderer()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetInteger m_Value = new GetInteger();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Position Count");
            return $"{this.m_TrailRenderer} {member} {this.m_Compare} {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            TrailRenderer component = this.m_TrailRenderer.Get<TrailRenderer>(args);
            if (component == null) return false;
            
            return this.m_Compare.Compare(component.positionCount, (int) this.m_Value.Get(args));
        }
    }
}


```

