How to convert unit to pixel

Hi guys!
if(Input.touchCount==1)
{

Touch parmak=Input.GetTouch(0);
float x=parmak.position.x/Screen.width;
float y=parmak.position.y/Screen.height;
Instantiate(obj,new Vector3(x,y,0),Quaternion.identity);

}

My phone does not occur in the object(Android).
Where is the error. Please help me;

this is about converting position between “world space” and “screen space”.

instantiate needs world space.

and I’m pretty sure touch.position will return screen position.

you need to convert between these using camera.

vector3 pos = Camera.main.ScreenToWorldPoint(touch.pos);

instantiate(…,pos,…);

hope it helps

@DylanYasen
if(Input.touchCount==1)
{

Touch parmak=Input.GetTouch(0);
Vector3 pos=Camera.main.ScreenToWorldPoint(new Vector3(parmak.position.x,parmak.position.y,0));
Instantiate(obj,pos,Quaternion.identity);

} not work . please help me