Hi, again. Here another question. I got 6 clones each clone has 2 gameObject with a spriteRender. And now I want to change my sprites. But it changes only 1 clone and only 1 sprite. Maybe someone can help me.
public Sprite[] SpritePipes;
void Start() {
Sprite mySpritePipes = SpritePipes[0];
for(float x = 0; x< 7.8f; x = x + 1.3f)
{
Instantiate(pipesStructur, new Vector3(x + 3, 0.9f, 0), Quaternion.identity);
test = GameObject.Find("Pipes(Clone)").GetComponentInChildren<SpriteRenderer>();
Debug.Log (GameObject.Find("Pipes(Clone)"));
test.sprite = mySpritePipes;
}
}