void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            NextPreset();
        }

        if (m_CurrentPresetIndex != m_PreviousPresetIndex)
        {
            if (m_CurrentPresetIndex < 0)
            {
                m_CurrentPresetIndex = m_Presets.Length - 1;
            }
            if (m_CurrentPresetIndex >= m_Presets.Length)
            {
                m_CurrentPresetIndex = 0;
            }

            if (m_CurrentPresetIndex >= 0)
            {
                m_Trail.DisableTrail();
                m_Trail.SetTrailPreset(m_Presets[m_CurrentPresetIndex]);
                m_Trail.EnableTrail();
                m_PreviousPresetIndex = m_CurrentPresetIndex;
            }
        }
    }
 private void Update()
 {
     if (Input.GetKeyDown(m_EnableKey))
     {
         m_Trail.EnableTrail();
     }
     if (Input.GetKeyDown(m_DisableKey))
     {
         m_Trail.DisableTrail();
     }
 }