This question was
closed Sep 30, 2017 at 06:16 AM by
Kawaiinya for the following reason:
Had answer in my first question
Instantiate prefab with its component c#
Im instantiating a prefab Sprite which containt Transform and Sprite Renderer components. But my instantiated objects doesnt have Sprite Renderer component. The main question - why?
Here is my code:
void Start () {
int cell = 1;
GameObject dot = new GameObject("dot");
for(int y = 0; y <= 3; y++)
for(int x = 0; x <= 3; x++)
{
Vector3 pos = new Vector3 (x, y, 0) * cell;
Instantiate(dot, pos, Quaternion.identity);
}
}
Comment