- Home /
Drawing circles on canvas's panel
Hello, In my project I have a canvas which has panel drawn on it. I would like to be able to click on that panel and then black cricle should appear. I would like to store the coo. of these points in some kind of array. Here is what I've got, but it doesn't work:
private void Update()
{
if (Input.GetMouseButtonDown(0))
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray))
{
//draw circle here
Debug.Log(transform.position);
}
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612143437im_/https://answers.unity.com/themes/thub/images/avi.jpg)