unity中实现圆环进度条,且加载时两端仍然是圆角

问题遇到的现象和发生背景

无法实现加载时两端仍然是圆角,我可以实现圆环进度条但是加载时两端是平角。

问题相关代码,请勿粘贴截图

进度条的代码:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class CircleUI : MonoBehaviour
{

    [SerializeField]
    float speed;

    [SerializeField]
    Transform Imageprocess;

    [SerializeField]
    Transform Textindicator;

    public int targetProcess { get; set; }
    private float currentAmout = 0;

    // Use this for initialization
    void Start()
    {
        targetProcess = 450;
    }

    // Update is called once per frame
    void Update()
    {

        if (currentAmout < targetProcess)
        {
            Debug.Log("currentAmount:" + currentAmout.ToString());

            currentAmout += speed;
            if (currentAmout > targetProcess)
                currentAmout = targetProcess;
            Textindicator.GetComponent<Text>().text = ((int)currentAmout).ToString() + "W";
            Imageprocess.GetComponent<Image>().fillAmount = currentAmout / 450.0f;
        }

    }


    public void SetTargetProcess(int target)
    {
        if (target >= 0 && target <= 450)
            targetProcess = target;
    }

}


运行结果及报错内容
我的解答思路和尝试过的方法

尝试过用遮罩,但是加载过程中只有遮住的一端为圆角,加载中仍然是平角

我想要达到的结果

圆环进度条,加载时两端为圆角

两端用遮罩遮住,让遮罩跟随转动,计算遮罩移动路径,实际就是圆或圆弧 计算对应的圆心角即可。

可以参考一下:https://zhuanlan.zhihu.com/p/75619677