GameObjects not coming in the correct order

I wanted to get something like a progress bar in Unity for which I used Handles.drawsolidarc. The code is working fine but if I place any game object in front of it (in terms of the Z coordinate), when running the project anything in front of it comes behind. If I want to place progress bar behind sphere what should I do?
I have attached the following script to an empty game object to draw the progress bar :

using UnityEngine;
using System.Collections;
using UnityEditor;

public class circledraw : MonoBehaviour {
    int angle = 180;
    int radius = 100;
    int angle2 = 0;
    int angle3 = 0;
    // Use this for initialization
    void Start () {
    }
    void OnDrawGizmos()
    {
        Handles.color = Color.cyan;
        Handles.DrawSolidArc (new Vector3 (0, 0, 0),new Vector3 (0, 0, 1), new Vector3 (1, 0, 0),angle, radius);
    }
    void Update () {
    }
}

Link to Picture :
The sphere is in front of the semicircle ( z coordinates )

Handles/Gizmos in the editor are intentionally drawn in front of all other geometry. If you want a progress bar in your game you cannot use editor features. Instead maybe consider the GL class.

1 Like

Sorry for a late reply.
I have just started learning Unity. How do you suggest I start using/learning GL ? Does it require knowledge of OpenGL ?