Hi,
I want to paint on touch screen with prefab, where I touch there will be a red sprite (prefab).
Here is my code :
var i : Vector2;
var prefab : Transform;
function FixedUpdate () {
i = Input.GetTouch(0).position;
var touch : UnityEngine.Touch;
if(Input.touchCount >0)
{
Instantiate (prefab, i ,transform.rotation);
Debug.Log(i);
}
}
Here is screenshot when I click on 4 corners
The White thing is ortographic Camera.
