Usually for instantiating something you want the change after,
you’d do
Rigidbody r;
r = Instantiate (object, position, rotation);
r.transform.position += 1;
and what if something doesnt have a rigidbody?
Usually for instantiating something you want the change after,
you’d do
Rigidbody r;
r = Instantiate (object, position, rotation);
r.transform.position += 1;
and what if something doesnt have a rigidbody?
that’s not really true.
Instantiate takes an Object and returns an Object so you can get the GameObject, Transform, Rigidbody or any component from it:
GameObject myGameObject = Instantiate(object, position, rotation) as GameObject;
myGameObject.name = "New Name";
myGameObject.transform = new Vector3(0,0,0);
myGameObject.GetComponent<customScript>().variable = 10;