Files
2025-07-20 10:01:29 +08:00

24 lines
594 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EmeraldAI.Utility
{
/// <summary>
/// Clears all points from a Trailer Renderer to stop the previous position from being visible when respawning projectiles that use a TrailRenderer.
/// </summary>
public class TrailRendererHelper : MonoBehaviour
{
TrailRenderer m_TrailRenderer;
void Awake()
{
m_TrailRenderer = GetComponent<TrailRenderer>();
}
void OnDisable()
{
m_TrailRenderer.Clear();
}
}
}