public T GetRandomValue()
        {
            if (m_Count <= 0)
            {
                Debug.LogError("randomizer is empty!");
                return(default(T));
            }

            if (m_Count == 1)
            {
                return(m_Values[0]);
            }

            float randomWeight = MathHelpers.Random_Factor_Looped() * m_TotalWeight;

            float curAccumulatedWeight = 0.0f;

            for (int i = 0; i < m_Count; i++)
            {
                curAccumulatedWeight += m_Weights[i];

                if (curAccumulatedWeight > randomWeight)
                {
                    return(m_Values[i]);
                }
            }

            return(m_Values[m_Count - 1]);
        }