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

# Trail Renderer Clear

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

## Description

Executes the Clear method on the Trail Renderer component

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


```

