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

# Trail Renderer Emitting

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

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Emitting property of 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
{
    [Get]
    [Set]
    
    [Title("Trail Renderer Emitting")]
    [Category("Effects/Trail Renderer/Emitting")]
    [Description("The Emitting property of the Trail Renderer component")]
    
    [Image(typeof(IconTrailRenderer), ColorTheme.Type.Blue, typeof(BadgeEye))]
    [Keywords("Effect")]
    
    [Serializable]
    public class GenTypeBool_TrailRenderer_Emitting : TypeBool
    {
        [SerializeField] private GetGameObject m_TrailRenderer = new GetGameObject(
            new GenTypeGameObject_TrailRenderer()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_TrailRenderer.GetPreview(source);
            if (instance == null) return default;
            
            TrailRenderer component = instance.GetComponent<TrailRenderer>();
            return component != null ? component.emitting : default;
        }
        
        public override bool Get(Args args)
        {
            TrailRenderer instance = this.m_TrailRenderer.Get<TrailRenderer>(args);
            return instance != null
                ? instance.emitting
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            TrailRenderer component = this.m_TrailRenderer.Get<TrailRenderer>(args);
            if (component != null) component.emitting = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_TrailRenderer} Emitting";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

