public bool RemoveParameter(UnityEditor.Animations.AnimatorController animator, string paramName, AnimatorControllerParameterType type)
 {
     foreach (AnimatorControllerParameter param in animator.parameters)
     {
         if (param.name == paramName && param.type == type)
         {
             animator.RemoveParameter(param);
             return(true);
         }
     }
     return(false);
 }
    private void CreateParameters()
    {
        int parameterCount = 0;// controller.parameterCount;

        for (int i = 0; i < parameterCount; i++)
        {
            controller.RemoveParameter(0);
        }

        if (previewedMotion is UnityEditor.Animations.BlendTree)
        {
            UnityEditor.Animations.BlendTree blendTree = previewedMotion as UnityEditor.Animations.BlendTree;

            for (int j = 0; j < blendTree.GetRecursiveBlendParamCount(); j++)
            {
                //controller.AddParameter(blendTree.GetRecursiveBlendParam(j), AnimatorControllerParameterType.Float);
            }
        }
    }