i am running this in update to Instantiate multiple prefabs.
the look at and the distance bit works as expected while the mouse is pressed.
the bit about color continues on the first instance only.
there must be something different when accessing materials but i dont know what.
if (Input.GetMouseButton(0))
{
if (hitObject.name == ("floor"))
{
//this all works
var dist = Vector3.Distance(point, newObj.position) * 0.1;
newObj.localScale = Vector3(dist + .2, dist + .2, dist + .2);
newObj.LookAt(point,normal);
//this part doesnt work.
newObj.gameObject.Find("vine").renderer.material.color = Color.red;
}
}