Question by
rnb-it · Jun 23, 2017 at 07:33 AM ·
instantiate prefab
instantiate gameobject vs transform
I have a problem with the instantiate of a prefab. when i use the type Transform then all objects are shown and placed on the Hierarchy. But when i change the type to GameObject only one is made. I use Unity 5.6. On all examples it should work? Why ?
public Transform myCube;
for (int z = 0; z < 20 ; z++) {
Vector3 point = new Vector3 (1, 1, z * 3);
Instantiate (myCube, point, Quaternion.identity);
}
Comment
Your answer
Follow this Question
Related Questions
Instantiating at a specific location? 0 Answers
How to Instantiate platforms with certain space inbetween each platform (Endless Runner) 0 Answers
How to Instantiate a prefab with radius using OverlapCircleAll ? 0 Answers
Prefabs not instantiating after build 0 Answers
Why do my first 50 instances of a prefab have the same properties? 1 Answer