What is different when Instantiate set Prefab Position?
I'm Unity begin Developer in Korea. English is fool.... plz Understand
My Question is ' What is different both? '
GameObject obj = Instantiate(targetObj); obj.transform.position = new Vector3(x,y,z);
GameObject obj = Instantiate(targetObj, new Vector3(x,y,z), Quaternion.identity);
I saw, when i spawn some objs, '1' is wrong position set. but, '2' is correct working for me;
I wandering what is different working process. I guess '1' is first make after set position, '2' is make and set in same time. both way same destination, but is not. plz teach me... thanks
Answer by tormentoarmagedoom · May 10, 2018 at 07:52 AM
Good day.
I really don't know the exactly answer. Technikly, there is no difference, but as parent may have diferent scales, or the parent is also child of other object, or things like this sometimes... I always use "2" way, to be sure it will be placed where i want.