ParticleSystemCurveEditor.AddCurveDataIfNeeded C# (CSharp) Method

AddCurveDataIfNeeded() public method

public AddCurveDataIfNeeded ( string curveName, CurveData, curveData ) : void
curveName string
curveData CurveData,
return void
    public void AddCurveDataIfNeeded(string curveName, CurveData curveData)
    {
        Vector3 vector = SessionState.GetVector3(curveName, Vector3.zero);
        if (vector != Vector3.zero)
        {
            Color color = new Color(vector.x, vector.y, vector.z);
            curveData.m_Color = color;
            this.AddCurve(curveData);
            for (int i = 0; i < this.m_AvailableColors.Count; i++)
            {
                if (SameColor(this.m_AvailableColors[i], color))
                {
                    this.m_AvailableColors.RemoveAt(i);
                    break;
                }
            }
        }
    }